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
f2f37448
Commit
f2f37448
authored
Oct 10, 2020
by
Nils Goroll
Committed by
Reza Naghibi
Apr 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix request body reference count assertion
Test case by Reza, thank you Fixes #3433 Closes #3434
parent
8b36d038
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
cache_req_body.c
bin/varnishd/cache/cache_req_body.c
+3
-2
r03433.vtc
bin/varnishtest/tests/r03433.vtc
+41
-0
No files found.
bin/varnishd/cache/cache_req_body.c
View file @
f2f37448
...
...
@@ -272,8 +272,9 @@ VRB_Free(struct req *req)
r
=
HSH_DerefObjCore
(
req
->
wrk
,
&
req
->
body_oc
,
0
);
// a busyobj may have gained a reference
assert
(
r
==
0
||
r
==
1
);
// each busyobj may have gained a reference
assert
(
r
<=
req
->
restarts
+
1
);
}
/*----------------------------------------------------------------------
...
...
bin/varnishtest/tests/r03433.vtc
0 → 100644
View file @
f2f37448
varnishtest "req.body and restarts"
server s1 -repeat 4 {
rxreq
txresp -bodylen 1000
} -start
varnish v1 -vcl+backend {
import std;
import vtc;
sub vcl_recv {
std.cache_req_body(1MB);
return (hash);
}
sub vcl_backend_response {
set beresp.ttl = 0.1s;
}
sub vcl_deliver {
if (!req.restarts) {
set req.url = "/2";
return (restart);
}
}
} -start
client c1 {
txreq -req PUT -url /1 -bodylen 250000
rxresp
expect resp.status == 200
delay 0.2
txreq -req PUT -url /1 -bodylen 250000
rxresp
expect resp.status == 200
} -run
delay 0.2
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