[Web-SIG] wsgiref bug with HEAD request
Christian Wyglendowski
christian at dowski.com
Mon Nov 13 03:51:43 CET 2006
On 11/12/06, Joe Gregorio <joe at bitworking.org> wrote:
>
> According to RFC 2616 the HEAD response MUST NOT
> return a message-body in the response:
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4
Right. I *think* the problem that Sylvain is bringing to light is that a
different headers are being returned for HEAD and GET requests. From the
section of RFC 2616 that you referenced above:
"The metainformation contained in the HTTP headers in response to a HEAD
request SHOULD be identical to the information sent in response to a GET
request."
So if an app/middleware sets what it deems to be the correct Content-Length
for a resource in response to a HEAD request, it gets overridden by the
server, which sets it to zero.
Christian
http://www.dowski.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/web-sig/attachments/20061112/3eae5067/attachment.htm
More information about the Web-SIG
mailing list