"Omar Kilani" <[EMAIL PROTECTED]> writes:
> I'd like to modify req.hash in vcl_hash to take into account the value
> of this particular cookie [...]
> From looking through the varnish-cache code, I don't think this type
> of operation is supported, and I'm not sure what the best way to
> represent this in VCL is.

Poul-Henning is working on making multi-value headers accessible as
associative arrays, e.g. "req.http.cache-control[max-age]" for
"Cache-control: max-age".  This implies not only inspection but also
modification of individual fields.  Your patch is a step in the right
direction, though it probably duplicates (or conflicts with) part of
Poul-Henning's work.

In any case, could you please open a ticket with the patch as an
attachment?

> Doing something like req.http.Cookie.LANGUAGE *could* theoretically do
> the right thing (and use http_GetHdrField, although some browsers can
> send multiple values for the same cookie name... :)

AFAIR from RFC2616, if multiple values are provided for the same key,
only the last one applies.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
_______________________________________________
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to