• Poul-Henning Kamp's avatar
    Add a facility to constructing a synthetic object from VCL. · f2fb353a
    Poul-Henning Kamp authored
    This is just the initial version and it doesn't quite work the way
    we need it to yet, but the idea is to be able to say:
    
    	sub vcl_fetch {
    	    if (obj.status == 503) {
    		synthetic {"
    		    <HTML>
    		    <H1>Sorry, could not contact the backend server</H1>
    		    <P>
    			Try again later.
    		    </P>
    		    <HR>
    		    <PRE>
    			URL: "}  req.url {"
    			User Agnet: "} req.http.user-agent {"
    		    </PRE>
    		    </HTML>
    		"};
    	    }
    	}
    
    A new VCL syntactic element have been introduced to do this: "the
    long string".   A long string is anything from {" to "}, newlines,
    controlcharacters and all.  (Normal "..." strings cannot contain
    control characters.
    
    Technical details:
    
    Don't NULL terminate string sequences in VRT context, we may have
    NULL cropping up as a legal value if a header is missing, add the
    magic "vrt_magic_string_end" for terminating string contactenation.
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3026 d4fa192b-c00b-0410-8231-f00ffab90ce4
    f2fb353a
Name
Last commit
Last update
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
man Loading commit data...
redhat Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
varnishapi.pc.in Loading commit data...