aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test27
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-03-10 11:20:56 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-03-10 11:26:12 +0100
commit7f7fcd0d756416b0a146b6f34a899e59456b2c17 (patch)
tree2bff1f9a5d478722dfc7caca1ed0260378482a3b /tests/data/test27
parent4d4ce84bb3eccbf9c249f1a43fa79fb9ba14a29b (diff)
cookies: first n/v pair in Set-Cookie: is the cookie, then parameters
RFC 6265 section 4.1.1 spells out that the first name/value pair in the header is the actual cookie name and content, while the following are the parameters. libcurl previously had a more liberal approach which causes significant problems when introducing new cookie parameters, like the suggested new cookie priority draft. The previous logic read all n/v pairs from left-to-right and the first name used that wassn't a known parameter name would be used as the cookie name, thus accepting "Set-Cookie: Max-Age=2; person=daniel" to be a cookie named 'person' while an RFC 6265 compliant parser should consider that to be a cookie named 'Max-Age' with an (unknown) parameter 'person'. Fixes #709
Diffstat (limited to 'tests/data/test27')
-rw-r--r--tests/data/test272
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/data/test27 b/tests/data/test27
index 5ae2ffd4f..6fed3d994 100644
--- a/tests/data/test27
+++ b/tests/data/test27
@@ -11,7 +11,7 @@ cookies
<data>
HTTP/1.1 200 Mooo swsclose
Connection: close
-Set-Cookie: path=/; thewinneris=nowayyouwin;
+Set-Cookie: thewinneris=nowayyouwin; path=/;
Content-Length: 8
*flopp*