couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hammond <>
Subject Re: svn commit: r808632 - /couchdb/trunk/src/couchdb/couch_httpd.erl
Date Thu, 27 Aug 2009 23:05:56 GMT
On 28/08/2009 7:20 AM, Paul Davis wrote:
> Does this mean that HEAD requests for views don't return a
> Content-Length header? And is that important?

I believe it is important - kindof.  RFC2616 says, in summary, that the 
response to a HEAD request should be the same as for a GET, but without 
the body.  So I *think* this means couch is free to not supply a 
content-length (as it doesn't for a GET), but should still include the 
transfer-encoding: chunked header the GET returns.

I'm also fairly confident another content-length issue exists; if a 
conditional request is made for an attachment and the entity hasn't 
changed, couch correctly returns a 304 response, but incorrectly 
includes a "content-length: 0" header.  The RFC isn't quite as explicit 
about this case, but section 10.3.5 implies no content-length header 
should be returned at all in this case, even in the case where a 
content-length header would be supplied in a 200 response.



View raw message