From 18c735e790e47a1199f9dd71a01aa9847d6474b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Feb 2016 15:48:18 +0100 Subject: cookies: allow spaces in cookie names, cut of trailing spaces It turns out Firefox and Chrome both allow spaces in cookie names and there are sites out there using that. Turned out the code meant to strip off trailing space from cookie names didn't work. Fixed now. Test case 8 modified to verify both these changes. Closes #639 --- tests/data/test8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/data') diff --git a/tests/data/test8 b/tests/data/test8 index 030fd55eb..ffc421ab8 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -41,6 +41,8 @@ Set-Cookie: partmatch=present; domain=.0.0.1; path=/w; Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; Set-Cookie: cookie=yes; path=/we; Set-Cookie: cookie=perhaps; path=/we/want; +Set-Cookie: name with space=is weird but; path=/we/want; +Set-Cookie: trailingspace = removed; path=/we/want; Set-Cookie: nocookie=yes; path=/WE; Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; Set-Cookie: partialip=nono; domain=.0.0.1; @@ -60,7 +62,7 @@ perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs endi GET /we/want/8 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* -Cookie: cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes +Cookie: cookie=perhaps; name with space=is weird but; trailingspace=removed; cookie=yes; foobar=name; blexp=yesyes -- cgit v1.2.3