Ignore:
Timestamp:
2008-07-25 17:33:04 (6 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
master, 3.0, 4.0, experimental-ims
Children:
714e0e
Parents:
d45b49f
git-author:
Poul-Henning Kamp <phk@…> (2008-07-25 17:33:04)
git-committer:
Poul-Henning Kamp <phk@…> (2008-07-25 17:33:04)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.