]> err.no Git - varnish/commit
Gently shuffle closer to being able to restart a esi:include on the next
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 24 Oct 2007 14:32:12 +0000 (14:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 24 Oct 2007 14:32:12 +0000 (14:32 +0000)
commitc5f15fa50d46727e2719f3e77c03f7bcbbadc238
tree5fd40c75de9a4d7e2b2e011f4be3958f2d4639cf
parent60ae9d76bad0efd18edd8e5217148e171128f224
Gently shuffle closer to being able to restart a esi:include on the next
element:

Add two checkpoints for the sessions workspace.

The first checkpoint is after the session fixed data, and move the
client address and port to workspace to see that this works.

The second checkpoint is after the, as received unadultered by VCL
http request.  Grab a copy of the http request matching this.

Implement rollback as an optional feature of restart in VCL.

Move various workspace initialization and resetting operations to more
suitable locations in the program flow.

I don't know if this is really usable, but now it's possible to do:

backend b1 {
set backend.host = "backend1";
set backend.port = "80";
}

backend b2 {
set backend.host = "backend2";
set backend.port = "80";
}

sub vcl_recv {
set req.backend = b1;
remove req.http.cookie;

if (req.restarts == 0) {
set req.url = "foobar.html";
} else {
set req.backend = b2;
}
}

sub vcl_fetch {
if (obj.status != 200) {
restart rollback;
}
}

And have it first look for "foobar.html" on one backend, and failing
that, try to give the user what they asked for from the other backend.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2167 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_acceptor.c
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_httpconn.c
varnish-cache/bin/varnishd/cache_session.c
varnish-cache/bin/varnishd/cache_vrt.c
varnish-cache/bin/varnishd/cache_ws.c
varnish-cache/include/vrt.h
varnish-cache/lib/libvcl/vcc_action.c
varnish-cache/lib/libvcl/vcc_fixed_token.c