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
1d9d85eb
Commit
1d9d85eb
authored
Apr 05, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collect H2 cookies in H2 code, long time before we get to create req->http0.
Fixes #2300 Testcase by Simon
parent
b8d06876
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+0
-3
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+6
-0
r02300.vtc
bin/varnishtest/tests/r02300.vtc
+29
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
1d9d85eb
...
...
@@ -799,9 +799,6 @@ cnt_recv(struct worker *wrk, struct req *req)
http_CollectHdr
(
req
->
http
,
H_Cache_Control
);
if
(
req
->
http
->
protover
==
20
)
// rfc7540,l,3114,3120
http_CollectHdrSep
(
req
->
http
,
H_Cookie
,
"; "
);
if
(
req
->
req_body_status
==
REQ_BODY_FAIL
)
{
req
->
doclose
=
SC_OVERLOAD
;
return
(
REQ_FSM_DONE
);
...
...
bin/varnishd/http2/cache_http2_proto.c
View file @
1d9d85eb
...
...
@@ -467,6 +467,12 @@ h2_do_req(struct worker *wrk, void *priv)
CAST_OBJ_NOTNULL
(
req
,
priv
,
REQ_MAGIC
);
CAST_OBJ_NOTNULL
(
r2
,
req
->
transport_priv
,
H2_REQ_MAGIC
);
THR_SetRequest
(
req
);
// XXX: Smarter to do this already at HPACK time into tail end of
// XXX: WS, then copy back once all headers received.
// XXX: Have I mentioned H/2 Is hodge-podge ?
http_CollectHdrSep
(
req
->
http
,
H_Cookie
,
"; "
);
// rfc7540,l,3114,3120
req
->
http
->
conds
=
1
;
if
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
)
{
AZ
(
req
->
ws
->
r
);
...
...
bin/varnishtest/tests/r02300.vtc
0 → 100644
View file @
1d9d85eb
varnishtest "ESI Cookie"
server s1 {
fatal
rxreq
expect req.http.cookie == "Foo=Bar; B=C"
txresp -body "
<html><esi:include
src=
'/esi_test'
/>
"
rxreq
expect req.http.cookie == "Foo=Bar; B=C"
txresp
} -start
varnish v1 -cliok {param.set feature +http2}
varnish v1 -cliok {param.set debug +syncvsl}
varnish v1 -vcl+backend {
sub vcl_backend_response {
set beresp.do_esi = true;
}
} -start
client c1 {
stream 1 {
txreq -url "/" -hdr cookie "Foo=Bar" -hdr cookie "B=C"
rxresp
} -start
} -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