Commit bcee5e43 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add regression test for ticket 412



git-svn-id: http://www.varnish-cache.org/svn/trunk@3465 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8c3639b7
# $Id$
test "Regression test for ticket 412"
server s1 {
rxreq
expect req.url == "/"
txresp -status 303 -hdr "Location: /foo"
rxreq
expect req.url == "/foo"
txresp -body "12345"
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
if (obj.status == 303) {
set obj.cacheable = true;
set obj.ttl = 60 s;
set obj.http.X-Magic-Redirect = "1";
set req.url = obj.http.Location;
restart;
}
}
sub vcl_hit {
if (obj.http.X-Magic-Redirect == "1") {
set req.url = obj.http.Location;
restart;
}
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
} -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment