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
f3c8cd4d
Commit
f3c8cd4d
authored
Mar 15, 2018
by
Nils Goroll
Committed by
Dridi Boukelmoune
Jun 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix proxy backend in pipe mode
Fixes #2613
parent
861f8f49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+3
-0
o00002.vtc
bin/varnishtest/tests/o00002.vtc
+18
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
f3c8cd4d
...
...
@@ -693,6 +693,8 @@ cnt_pipe(struct worker *wrk, struct req *req)
VSLb
(
bo
->
vsl
,
SLT_Begin
,
"bereq %u pipe"
,
VXID
(
req
->
vsl
->
wid
));
VSLb
(
req
->
vsl
,
SLT_Link
,
"bereq %u pipe"
,
VXID
(
bo
->
vsl
->
wid
));
THR_SetBusyobj
(
bo
);
bo
->
sp
=
req
->
sp
;
SES_Ref
(
bo
->
sp
);
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
SLT_BereqMethod
);
http_FilterReq
(
bo
->
bereq
,
req
->
http
,
0
);
// XXX: 0 ?
...
...
@@ -726,6 +728,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
WRONG
(
"Illegal return from vcl_pipe{}"
);
}
http_Teardown
(
bo
->
bereq
);
SES_Rel
(
bo
->
sp
);
VBO_ReleaseBusyObj
(
wrk
,
&
bo
);
THR_SetBusyobj
(
NULL
);
return
(
nxt
);
...
...
bin/varnishtest/tests/o00002.vtc
View file @
f3c8cd4d
...
...
@@ -34,6 +34,13 @@ server s1 {
expect req.http.xyzzy1 == 4444
expect req.http.x-forwarded-for == "1:f::2, 1:f::2"
txresp -body "proxy4"
rxreq
expect req.url == "/pipe"
expect req.http.xyzzy1 == req.http.xyzzy2
expect req.http.xyzzy1 == 5555
expect req.http.x-forwarded-for == "1:f::2, 1:f::2"
txresp -hdr "Connection: close" -body "pipe"
} -start
varnish v1 -proto PROXY -vcl+backend {
...
...
@@ -64,6 +71,9 @@ varnish v2 -proto PROXY -vcl {
} else {
set req.backend_hint = bp2;
}
if (req.url ~ "^/pipe") {
return (pipe);
}
}
sub vcl_deliver {
set resp.http.connection = "close";
...
...
@@ -97,3 +107,11 @@ client c1 -connect ${v2_sock} -proxy1 "[1:f::2]:4444 [5:a::8]:5678" {
expect resp.body == "proxy4"
} -run
delay .2
client c1 -connect ${v2_sock} -proxy1 "[1:f::2]:5555 [5:a::8]:5678" {
txreq -url /pipe
rxresp
expect resp.body == "pipe"
expect resp.http.Connection == "close"
expect_close
} -run
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