[Varnish] #730: varnishd/cache_fetch.c:FetchBody dropping Content-Length on HEAD

Varnish varnish-bugs at varnish-cache.org
Wed Jun 30 23:24:41 CEST 2010


#730: varnishd/cache_fetch.c:FetchBody dropping Content-Length on HEAD
----------------------+-----------------------------------------------------
 Reporter:  dormando  |        Type:  defect
   Status:  new       |    Priority:  normal
Milestone:            |   Component:  build 
  Version:  trunk     |    Severity:  normal
 Keywords:            |  
----------------------+-----------------------------------------------------
 Above is more or less it. Run a HEAD request against any webserver, and
 it'll return a Content-Length, which is useful for presizing, embedding
 length of remote objects into RSS feeds, etc.

 Varnish elects to not add the header if the request is a HEAD request.

 cache_fetch.c:FetchBody should have the 'if (is_head)' check within the
 Content-Length test and continue to set mklen = 1, although I think the
 mklen flag is rendered useless by this and could just be dropped.

 Unless there's some reason for this? Apache sends back a Content-Length
 with HEAD, and I can't see anywhere in the RFC which states you can't or
 shouldn't do that.

 thanks!

-- 
Ticket URL: <http://varnish-cache.org/ticket/730>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list