<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 31/03/11 12:58, AD wrote:
<blockquote
cite="mid:AANLkTi=T==z2r4SjTQLmyo65rXYednhwuXycZ9NjSpVm@mail.gmail.com"
type="cite">use -C to display the default VCL , or just put in a
command you want to do in C inside the vcl and then see how it
looks when running -C -f against the config.
<div><br>
</div>
<div><br>
<div class="gmail_quote">On Thu, Mar 31, 2011 at 7:39 AM, Dan <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:dan@retrobadger.net">dan@retrobadger.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> I would like to do
some more advanced functionality within our VCL file, and
to do so need to use the inline-c capabilities of
varnish. So, to start off with, I thought I would get my
VCL file to set the headers, so I can test variables, and
be sure it is working. But am getting a WSOD when I
impliment my seemingly simple code.<br>
<br>
<br>
So my main questions are:<br>
* Are there any good docs on the VRT variables<br>
* Are there examples/tutorials on using C within the VCL
(for beginners to the subject)<br>
* Is there something obvious I have overlooked when
writing my code<br>
<br>
<br>
The snipper from my current code is:<br>
<i><font color="#660000">sub detectmobile {</font></i><br>
<i><font color="#660000"> C{</font></i><br>
<i><font color="#660000"> VRT_SetHdr(sp, HDR_BEREQ,
"\020X-Varnish-TeraWurfl:", "no1",
vrt_magic_string_end);</font></i><br>
<i><font color="#660000"> }C</font></i><br>
<i><font color="#660000">}</font></i><br>
<i><font color="#660000">sub vcl_miss {</font></i><br>
<i><font color="#660000"> call detectmobile;</font></i><br>
<i><font color="#660000"> return(fetch);</font></i><br>
<i><font color="#660000">}</font></i><br>
<i><font color="#660000">sub vcl_pipe {</font></i><br>
<i><font color="#660000"> call detectmobile;</font></i><br>
<i><font color="#660000"> return(pipe);</font></i><br>
<i><font color="#660000">}</font></i><br>
<i><font color="#660000">sub vcl_pass {</font></i><br>
<i><font color="#660000"> call detectmobile;</font></i><br>
<i><font color="#660000"> return(pass);</font></i><br>
<i><font color="#660000">}</font></i><br>
<br>
<br>
Thanks for your advice,<br>
Dan<br>
</div>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a moz-do-not-send="true"
href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a moz-do-not-send="true"
href="http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc"
target="_blank">http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
Sorry, I am confused, where would I put -C, in my
/etc/default/varnish file? Is this required to use inline-c within
my vcl file?
</body>
</html>