[Varnish] #1299: Varnish caches redirects
Varnish
varnish-bugs at varnish-cache.org
Tue May 7 13:10:40 CEST 2013
#1299: Varnish caches redirects
-----------------------+----------------------
Reporter: janus.ite | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 3.0.3 | Severity: normal
Keywords: |
-----------------------+----------------------
When running varnishtest the following test fails:
{{{
varnishtest "Do not cache redirects"
server s1 {
rxreq
txresp -status 302 -hdr "Cache-Control: no-cache" -hdr "Location:
http://example.com"
rxreq
txresp -status 302 -hdr "Cache-Control: no-cache" -hdr "Location:
http://example.com"
} -start
varnish v1 -vcl+backend {
} -start
client c1 {
txreq -url "/"
rxresp
expect resp.status == 302
expect resp.http.Location == "http://example.com"
}
varnish v1 -expect cache_hit == 0
varnish v1 -expect cache_miss == 0
client c1 -run
varnish v1 -expect cache_hit == 0
varnish v1 -expect cache_miss == 1
client c1 -run
varnish v1 -expect cache_hit == 0
varnish v1 -expect cache_miss == 2
}}}
If I am not missing something, varnish should not cache redirects when
"Cache-Control" header is set to "no-cache".
Please see attached test results.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1299>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list