[Varnish] #1406: Setting a header to a falsy value than getting it returns true

Varnish varnish-bugs at varnish-cache.org
Fri Jan 10 17:30:14 CET 2014


#1406: Setting a header to a falsy value than getting it returns true
-----------------------------+----------------------
 Reporter:  brandonwamboldt  |       Type:  defect
   Status:  new              |   Priority:  high
Milestone:                   |  Component:  varnishd
  Version:  3.0.4            |   Severity:  normal
 Keywords:                   |
-----------------------------+----------------------
 Simple test case:


 {{{
 sub vcl_recv {
 C{
 VRT_SetHdr(sp, HDR_REQ, "\020X-CUSTOM-HEADER:",
         0,
         vrt_magic_string_end
       );
 }C
         if (req.http.X-CUSTOM-HEADER) {
                 std.log("-------------------------> TRUTHY");
         } else {
                 std.log("-------------------------> FALSY");
         }


 }
 }}}


 This was NOT the behaviour in 3.0.2, but does occur in 3.0.4. I don't
 believe this change should be made at all, definitely not in a minor
 version release.

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




More information about the varnish-bugs mailing list