Commit adbee352 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r3910: Don't pass range header to backend on miss.

Fixes ticket #466



git-svn-id: http://www.varnish-cache.org/svn/branches/2.0@4018 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 94de0378
# $Id$
test "Check Range forwarding to backend"
server s1 {
rxreq
expect req.url == "/foo"
expect req.http.range == "req.http.range"
txresp \
-hdr "Foobar: _barf_" \
-body "012345\n"
rxreq
expect req.url == "/bar"
expect req.http.range == "200-300"
txresp \
-status 206 \
-hdr "Foobar: _barf_" \
-body "012345\n"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
if (req.url ~ "bar") {
pass;
}
}
} -start -cliok "param.set diag_bitmap 0x10000"
client c1 {
txreq -url "/foo" -hdr "Range: 100-200"
rxresp
expect resp.status == 200
expect resp.http.X-Varnish == "1001"
txreq -url "/bar" -hdr "Range: 200-300"
rxresp
expect resp.status == 206
expect resp.http.X-Varnish == "1002"
} -run
......@@ -86,7 +86,7 @@ HTTPH("Max-Forwards", H_Max_Forwards, 1, 0, 0, 0, 0) /* RFC2616 14.31
HTTPH("Pragma", H_Pragma, 1, 0, 0, 0, 0) /* RFC2616 14.32 */
HTTPH("Proxy-Authenticate", H_Proxy_Authenticate, 2, 3, HTTPH_R_FETCH | HTTPH_A_INS, 0, 0) /* RFC2616 14.33 */
HTTPH("Proxy-Authorization", H_Proxy_Authorization, 1, 3, HTTPH_R_FETCH | HTTPH_A_INS, 0, 0) /* RFC2616 14.34 */
HTTPH("Range", H_Range, 1, 0, 0, 0, 0) /* RFC2616 14.35 */
HTTPH("Range", H_Range, 1, 0, HTTPH_R_FETCH | HTTPH_A_INS, 0, 0) /* RFC2616 14.35 */
HTTPH("Referer", H_Referer, 1, 0, 0, 0, 0) /* RFC2616 14.36 */
HTTPH("Retry-After", H_Retry_After, 2, 0, 0, 0, 0) /* RFC2616 14.37 */
HTTPH("Server", H_Server, 2, 0, 0, 0, 0) /* RFC2616 14.38 */
......
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