Commit b96d77c8 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

range: Let 416s pass through

Reported by Simon as a followup to #3683.
parent c8d0781d
......@@ -300,6 +300,8 @@ VRG_CheckBo(struct busyobj *bo)
if (crlo < 0) { // Content-Range: bytes */123
assert(crhi < 0);
assert(crlen > 0);
if (http_GetStatus(bo->beresp) == 416)
return (0);
crlo = 0;
crhi = crlen - 1;
}
......
......@@ -245,6 +245,10 @@ server s1 {
expect req.http.range == "bytes=10-19"
txresp -status 206 -hdr "content-range: bytes 10-19/100" -bodylen 40
rxreq
expect req.http.range == "bytes=90-119"
txresp -status 416 -hdr "content-range: bytes */100" -bodylen 100
rxreq
expect req.url == "/?unexpected=content-range"
expect req.http.range == <undef>
......@@ -279,6 +283,10 @@ client c8 {
rxresp
expect resp.status == 503
txreq -hdr "range: bytes=90-119" -hdr "return: pass"
rxresp
expect resp.status == 416
txreq -url "/?unexpected=content-range"
rxresp
expect resp.status == 503
......
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