[Varnish] #1761: 204 responses intermittently delivered as chunk-encoded with length byte = 0

Varnish varnish-bugs at varnish-cache.org
Mon Jul 6 17:14:32 CEST 2015


#1761: 204 responses intermittently delivered as chunk-encoded with length byte =
0
---------------------------------+----------------------
 Reporter:  geoff                |       Type:  defect
   Status:  new                  |   Priority:  normal
Milestone:  Varnish 4.0 release  |  Component:  varnishd
  Version:  4.0.3                |   Severity:  normal
 Keywords:                       |
---------------------------------+----------------------
 We are occasionally seeing responses with code 204 as chunked-encoded with
 one length byte `0` in the response body:

 {{{
 HTTP/1.1 204 No Content
 [...]
 Vary: Accept-Encoding
 Transfer-Encoding: chunked
 Connection: keep-alive

 0
 }}}

 These are not gzipped, as there is no Content-Encoding header, but they
 look very much as if they were set up to be delivered as gzipped -- in
 every example we've seen, they are always delivered for requests with
 `Accept-Encoding: gzip`.

 By definition, a 204 response should have no body at all. Instead, a
 response as shown above is chunked-encoded with a single chunk of length
 0.

 Unfortunately we haven't found a way to reliably reproduce the problem --
 we are seeing these cases in error reports from the load balancer in front
 of Varnish, and they always seem to happen during load tests. When we test
 exactly the same request manually, so far we always get a response with no
 body, as expected.

 After trying for a while to make it reproducible, I'd like to report the
 problem now while we keep looking.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1761>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list