[Varnish] #1321: Varnish 3.0.4 sends broken Content-length header

Varnish varnish-bugs at varnish-cache.org
Wed Jun 26 14:08:15 CEST 2013


#1321: Varnish 3.0.4 sends broken Content-length header
---------------------+--------------------
 Reporter:  crashev  |       Owner:
     Type:  defect   |      Status:  new
 Priority:  highest  |   Milestone:
Component:  build    |     Version:  3.0.4
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+--------------------

Comment (by daghf):

 The reporter sent me his VCL, and the problem stems from the fact that the
 semantics for assignments from unset headers changed slightly in 3.0.4.

 The change introduced in 3.0.4 is for assignment statements like
 {{{
   set req.http.foo = req.http.bar;
 }}}
 where the 'bar' header doesn't exist. For 3.0.3 the result would be that
 it left req.http.foo unset, whereas in 3.0.4 the result is that
 req.http.foo is set to an empty string.

 If you need the 3.0.3 behavior in 3.0.4 this can be done by rewriting your
 VCL to
 {{{
   if (req.http.bar) {
     set req.http.foo = req.http.bar;
   }
 }}}

 Related: #1218

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




More information about the varnish-bugs mailing list