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
d26a8287
Commit
d26a8287
authored
Mar 30, 2017
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collapse Cookie headers in HTTP/2
Fixes #2291
parent
5087989e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+4
-1
r02291.vtc
bin/varnishtest/tests/r02291.vtc
+33
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
d26a8287
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-201
5
Varnish Software AS
* Copyright (c) 2006-201
7
Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
...
...
@@ -799,6 +799,9 @@ 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/varnishtest/tests/r02291.vtc
0 → 100644
View file @
d26a8287
varnishtest "Collect cookie headers in HTTP/2"
server s1 -repeat 2 {
rxreq
txresp
} -start
varnish v1 -vcl+backend { } -start
varnish v1 -cliok "param.set feature +http2"
logexpect l1 -v v1 {
expect * * BereqProtocol HTTP/1.1
expect * = BereqHeader "Cookie: user=alice"
expect * = BereqHeader "Cookie: peer=bob"
expect * * BereqProtocol HTTP/2.0
expect * = BereqHeader "cookie: user=alice; peer=bob"
} -start
client c1 {
txreq -hdr "Cookie: user=alice" -hdr "Cookie: peer=bob"
rxresp
expect resp.status == 200
} -run
client c2 {
stream 1 {
txreq -hdr cookie user=alice -hdr cookie peer=bob
rxresp
expect resp.status == 200
} -run
} -run
logexpect l1 -wait
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