Add a facility to constructing a synthetic object from VCL.
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
Showing
Please register or sign in to comment