Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
b96d77c8
Commit
b96d77c8
authored
Sep 01, 2021
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
range: Let 416s pass through
Reported by Simon as a followup to #3683.
parent
c8d0781d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
cache_range.c
bin/varnishd/cache/cache_range.c
+2
-0
c00034.vtc
bin/varnishtest/tests/c00034.vtc
+8
-0
No files found.
bin/varnishd/cache/cache_range.c
View file @
b96d77c8
...
@@ -300,6 +300,8 @@ VRG_CheckBo(struct busyobj *bo)
...
@@ -300,6 +300,8 @@ VRG_CheckBo(struct busyobj *bo)
if
(
crlo
<
0
)
{
// Content-Range: bytes */123
if
(
crlo
<
0
)
{
// Content-Range: bytes */123
assert
(
crhi
<
0
);
assert
(
crhi
<
0
);
assert
(
crlen
>
0
);
assert
(
crlen
>
0
);
if
(
http_GetStatus
(
bo
->
beresp
)
==
416
)
return
(
0
);
crlo
=
0
;
crlo
=
0
;
crhi
=
crlen
-
1
;
crhi
=
crlen
-
1
;
}
}
...
...
bin/varnishtest/tests/c00034.vtc
View file @
b96d77c8
...
@@ -245,6 +245,10 @@ server s1 {
...
@@ -245,6 +245,10 @@ server s1 {
expect req.http.range == "bytes=10-19"
expect req.http.range == "bytes=10-19"
txresp -status 206 -hdr "content-range: bytes 10-19/100" -bodylen 40
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
rxreq
expect req.url == "/?unexpected=content-range"
expect req.url == "/?unexpected=content-range"
expect req.http.range == <undef>
expect req.http.range == <undef>
...
@@ -279,6 +283,10 @@ client c8 {
...
@@ -279,6 +283,10 @@ client c8 {
rxresp
rxresp
expect resp.status == 503
expect resp.status == 503
txreq -hdr "range: bytes=90-119" -hdr "return: pass"
rxresp
expect resp.status == 416
txreq -url "/?unexpected=content-range"
txreq -url "/?unexpected=content-range"
rxresp
rxresp
expect resp.status == 503
expect resp.status == 503
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment