Varnishlog.c

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jul 28 15:40:55 CEST 2006


In message <1441.193.213.34.102.1154093304.squirrel at denise.vg.no>, "Anders Berg
" writes:
>> "Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
>>> Anders Berg <andersb at vgnett.no> writes:
>>> > Line 132 sould be:
>>> > if (h_opt && p[1] == 4 && !memcmp(p + 4, "HEAD", 4)
>>> > I guess, rather than:
>>> > if (h_opt && p[1] == 4 && !memcmp(p + 4, "HEAD", 3)
>>> No, it is correct.  the "p[1] == 4" checks that the argument is
>>> 4 bytes long and the memcpy checks that it has the right contents.
>>
>> Yes, the 3 should be a 4 since "HEAD" has four letters.
>
>Thats what I also "figured" out.

Duh!  I looked at the wrong line...

yes, "HEAD" has four characters.

-- 
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-dev mailing list