On Thu, 31 Mar 2011 22:39:51 +1100, Dan <[email protected]> wrote:

The snipper from my current code is:

Is it correct to do this in all
vcl_miss, pipe and pass?
What about vcl_hit then?

I would have expected this to happen in vcl_deliver()
or vcl_fetch() if you want your backends to see
the header you're setting.

Anyway...

/sub detectmobile {/
/  C{/
/    VRT_SetHdr(sp, HDR_BEREQ, "\020X-Varnish-TeraWurfl:", "no1",
vrt_magic_string_end);/
/  }C/

I believe you have a problem in the "\020" bit.
That is octal notation.

"X-Whatever:" is 11 bytes, including the ':',
so you need to write:

  "\013X-Whatever:"

Have fun,

--
Cosimo

_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to