• 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
..
varnish Loading commit data...
Makefile.am Loading commit data...
binary_heap.h Loading commit data...
cli.h Loading commit data...
cli_priv.h Loading commit data...
compat.h Loading commit data...
hash.h Loading commit data...
http_headers.h Loading commit data...
libvarnish.h Loading commit data...
libvcl.h Loading commit data...
queue.h Loading commit data...
sbuf.h Loading commit data...
shmlog.h Loading commit data...
shmlog_tags.h Loading commit data...
stat_field.h Loading commit data...
stats.h Loading commit data...
tree.h Loading commit data...
varnishapi.h Loading commit data...
vcl.h Loading commit data...
vcl_returns.h Loading commit data...
vrt.h Loading commit data...