On Thu, Dec 16, 2010 at 2:30 PM, Stefan Pommerening <span dir="ltr"><<a href="mailto:pom@dmsp.de" target="_blank">pom@dmsp.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
of couse you only need one single vcl_recv subroutine. This applies to all vcl subroutines.<br>
I usually start with grabbing the default vcl and then add everything I need to the existing (default) subroutines.<br>
<br>
If you use the include statement you have to keep in mind that inclusion is a textual<br>
substitution - therefore no repeated definition of vcl_recv (or even other subroutines)<br>
is allowed.<br></blockquote><div><br></div><div>Actually, multiple definitions of the same subroutine is allowed. They are then concatenated, the flow being terminated only by the return statements. This is how the default VCL get overridden by your custom VCL. </div>
<div><br></div><div>There is a good example in the man vcl. Of course, this might get very confusing when you have multiple vcl_recv subroutines spread over several included files. Caution advised. :-)</div>
<div><br></div><div>-- </div></div>Per Buer, Varnish Software<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br>Varnish makes websites fly!<br>Want to learn more about Varnish? <a href="http://www.varnish-software.com/whitepapers" target="_blank">http://www.varnish-software.com/whitepapers</a><br>
<br>