pando.py icon indicating copy to clipboard operation
pando.py copied to clipboard

support 204

Open chadwhitacre opened this issue 11 years ago • 3 comments

We should serve a 204 when a simplate content page is empty.

10.2.5 204 No Content

The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.

If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view.

The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty line after the header fields.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5

chadwhitacre avatar Aug 14 '14 02:08 chadwhitacre

does 'empty' mean None? or '' ? or all-whitespace? which, or all, of those three, as output from a renderer, should cause a 204 to be raised?

pjz avatar Aug 24 '14 00:08 pjz

204 None 204 '' 200 all-whitespace

But, we should make sure that an empty simplate returns '' and not '\n'.

chadwhitacre avatar Aug 25 '14 16:08 chadwhitacre

I'm not sure that's a good idea (implicitly changing the response code just because the page is empty).

Changaco avatar Jul 25 '16 19:07 Changaco