From 8392a0cf612eaf045addc0b5d8da6d287be33907 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 30 Sep 2017 14:10:12 +0200 Subject: cookie: fix memory leak if path was set twice in header ... this will let the second occurance override the first. Added test 1161 to verify. Reported-by: Max Dymond Fixes #1932 Closes #1933 --- tests/data/test1161 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tests/data/test1161 (limited to 'tests/data/test1161') diff --git a/tests/data/test1161 b/tests/data/test1161 new file mode 100644 index 000000000..179531314 --- /dev/null +++ b/tests/data/test1161 @@ -0,0 +1,54 @@ + + + +HTTP +HTTP GET +cookies + + + +# Server-side + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Content-Length: 0 +Set-Cookie: ckyPersistent=permanent;path=;path=/ + + + + +# Client-side + + +http + + +HTTP cookie with path set twice + + +http://%HOSTIP:%HTTPPORT/1161 -c log/cookies1161.txt + + + +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1161 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + +# Netscape HTTP Cookie File +# https://curl.haxx.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +127.0.0.1 FALSE / FALSE 0 ckyPersistent permanent + + + -- cgit v1.2.3