On 3 February 2010 17:15, Richard Chiswell <[email protected]> wrote:
>> Hi Poul, >> >> Poul-Henning Kamp wrote: >>> In message <[email protected]>, Richard Chiswell writes: >>> >>>> I've got a simple question which I've been puzzling on for the last 30 >>>> minutes or so - how do you change a string in Varnish to lowercase? >>>> >>> You'll have to use a bit of inline C code to do that. I'm no varnish or C expert, YMMV etc... but I managed to get something like this working. It's a VCL with embedded C that reads the "Accept-Language" header and rewrites it (or writes into a different header, actually) the result of some processing function. Take a look at the examples here: http://github.com/cosimo/varnish-accept-language/tree/master/examples sample.vcl is the main VCL file, from which you embed the other one, accept-language.vcl, which in turn contains the C function you want to use. I think `vcl_rewrite_accept_language()' is what you need. Then you're only missing the upper->lower case bit. -- Cosimo _______________________________________________ varnish-misc mailing list [email protected] http://projects.linpro.no/mailman/listinfo/varnish-misc
