what if a header I'm testing is missing?

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Mar 21 20:53:19 CET 2008


In message <86db848d0803210805o466c975ay560f40dec854831b at mail.gmail.com>, "Mich
ael S. Fischer" writes:

>>  and I'm wondering if the first part of this is unnecessary.  For
>>  example, what happens if I have this...
>>
>>      if (req.http.Cookie ~ "(__ac=|_ZopeId=)") {
>>          pass;
>>      }
>>
>>  but no Cookie header is present in the request. 

Then the comparison always fails.

If this is not the case, it's a bug.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list