Re: Mapping VCL variables to internal variables

2008-05-22 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, Charles Curley writes:

>I'd like to set a variable in VCL, and then use it in a modification
>of Varnish. Having added to req.hash with something like:
>
>sub vcl_hash
>{
>if (req.http.Accept-Encoding ~ "gzip") {
>set req.hash +=3D "gzip";
>} else if (req.http.Accept-Encoding ~ "deflate") {
>set req.hash +=3D "deflate";
>}
>}
>
>where do I find that in Varnish itself?

See cache_center.c::cnt_lookup() [search for "VCL_hash_method(sp);"],
and cache_hash.c::HSH_Copy(), HSH_Compare() and HSH_Lookup().

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
varnish-dev mailing list
varnish-dev@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-dev


Mapping VCL variables to internal variables

2008-05-21 Thread Charles Curley
I'd like to set a variable in VCL, and then use it in a modification
of Varnish. Having added to req.hash with something like:

sub vcl_hash
{
if (req.http.Accept-Encoding ~ "gzip") {
set req.hash += "gzip";
} else if (req.http.Accept-Encoding ~ "deflate") {
set req.hash += "deflate";
}
}



where do I find that in Varnish itself?

Thanks

-- 

Charles Curley  /"\ASCII Ribbon Campaign
Looking for fine software   \ /Respect for open standards
and/or writing?  X No HTML/RTF in email
http://www.charlescurley.com/ \No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB


signature.asc
Description: Digital signature
___
varnish-dev mailing list
varnish-dev@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-dev