Varnishlog.c

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jul 28 14:31:46 CEST 2006


In message <E9EE0BDF-4329-47CF-8F1F-457D7046672E at vgnett.no>, Anders Berg writes
:
>Hi,
>
>I took a look at:
>
>http://varnish.projects.linpro.no/browser/trunk/varnish-cache/bin/ 
>varnishlog/varnishlog.c
>
>
>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.

>Also, I am scratching my head about the -h parameter in the code  
>line: 214. Is this supposed to be the -r param?

The -h option is an (experimental) attempt to show only "not normal"
goings on.

It's supposed to supress any GET or HEAD request that gets a hit and
delivers it with 200, or which does a fetch&insert and delivers with
200.

-- 
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