On Wed, Mar 28, 2012 at 2:32 PM, Paul A. Procacci <[email protected]> wrote: > https://github.com/varnish/libvmod-header > > Haven't tested it, but it seems this would do what the parent wants. > > `header.get(<header>, <regular expression>)` > > import header; > set req.http.cookie = header.get(req.http.cookie, "PHPSESSID"); > > ~Paul >
No, that also won't work unless the only cookie is PHPSESSID as this library will still return the ENTIRE header. >From the documentation, it looks like this library was written to help the situation where multiple "Set-Cookie" headers are sent from the backend and there exists a need to parse several of them, however I believe the vmod_std module now includes a collect() subroutine, which is capable of similar functionality by collapsing all headers of the same type into one long header of that same type: https://www.varnish-cache.org/docs/3.0/reference/vmod_std.html?highlight=collect -jlight _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
