• 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
..
varnishadm Loading commit data...
varnishd Loading commit data...
varnishhist Loading commit data...
varnishlog Loading commit data...
varnishncsa Loading commit data...
varnishreplay Loading commit data...
varnishstat Loading commit data...
varnishtest Loading commit data...
varnishtop Loading commit data...
Makefile.am Loading commit data...