• Poul-Henning Kamp's avatar
    Teach the VCL compiler about default functions, so that users will · 939aa1ba
    Poul-Henning Kamp authored
    not have to copy&paste the default methods if they have no special
    requirements for a particular method.
    
    No such facility exists for backends, so a backend description is
    now the minumum VCL program.
    
    When we initialize the VCL compiler we hand it a piece of source code
    with the "default code", this must include definitions of all methods
    named with a "default_" prefix (ie: "default_vcl_recv" etc).
    
    During compilation we always compile this piece of source code in (after
    the user supplied VCL source).
    
    If the user did not provide a particular method, the default method is
    used instead.  The user can also call the default method directly,
    for instance by:
    
    	sub vcl_recv {
    		if (req.http.Expect) {
    			error;
    		}
    		call default_vcl_recv;
    	}
    
    Later on, this could be expanded to allow other subroutines to be
    included in the default VCL for the users calling convenience.
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@449 d4fa192b-c00b-0410-8231-f00ffab90ce4
    939aa1ba
Name
Last commit
Last update
..
libcompat Loading commit data...
libsbuf Loading commit data...
libvarnish Loading commit data...
libvarnishapi Loading commit data...
libvcl Loading commit data...
Makefile.am Loading commit data...