[Varnish] #1221: 304 not modified response with body makes next request fail

Varnish varnish-bugs at varnish-cache.org
Tue Oct 23 15:31:24 CEST 2012


#1221: 304 not modified response with body makes next request fail
------------------------------+--------------------
 Reporter:  tmagnien          |       Owner:
     Type:  defect            |      Status:  new
 Priority:  normal            |   Milestone:
Component:  build             |     Version:  3.0.2
 Severity:  normal            |  Resolution:
 Keywords:  304 chunked body  |
------------------------------+--------------------

Comment (by tmagnien):

 Here is the testcase :


 {{{
 varnishtest "Bug #1221 '304 Not modified' with transfer-encoding chunked"

 # The first request, open the connection on the backend (the need a open
 # connection)
 # The second request, return a 304 with chunked encoding
 # The third failed.

 server s1 {
         rxreq
         txresp -body "cool"

         rxreq
         txresp -status 304 -nolen -hdr "Transfer-Encoding: chunked"
         chunkedlen 0

         rxreq
         txresp -body "cool"
 } -start

 varnish v1 -vcl+backend { } -start

 client c1 {
         txreq -req GET -url /1
         rxresp
         expect resp.status == 200

         txreq -req GET -url /2 \
               -hdr "If-Modified-Since: Tue, 16 Oct 2012 16:46:10 GMT"
         rxresp
         expect resp.status == 304
         expect resp.bodylen == 0

         txreq -req GET -url /3
         rxresp
         expect resp.status == 200
 } -run


 }}}

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1221#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list