Learning C and VRT_SetHdr()

Ken Brownfield kbrownfield at google.com
Thu Mar 31 20:09:24 CEST 2011


On Thu, Mar 31, 2011 at 06:25, Dan <dan at retrobadger.net> wrote:

> Sadly no luck with that, I have ammended my code as recommended.  Varnish
> is still able to restart without errors, but WSOD on page load.  My custom
> function is now something:
>

The length of your header is 20 characters including the colon.  013 is the
length (in octal) of the X-Whatever: example provided to explain this to
you, it is not octal for 20.  Replace 013 with 024 to avoid segfaults.
 There are docs covering this on the website, BTW.

What on earth is a WSOD?
-- 
kb



>
> sub detectmobile {
>  C{
>    VRT_SetHdr(sp, HDR_BEREQ, "\013X-Varnish-TeraWurfl:", "no1",
> vrt_magic_string_end);
>  }C
> }
>
> And the only occurance of 'call detectmobile;' is in:
> sub vcl_deliver {}
>
> Are there any libraries required for the VRT scripts to work?
>
> Do I need to alter the /etc/varnish/default file for C to work in varnish?
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110331/16e83bfd/attachment-0001.html>


More information about the varnish-misc mailing list