Changelog
Daniel Fandrich (9 Apr 2008)
-- Added test case 1024 to test a scenario similar to the one reported
+- Added test cases 1024 & 1025 to test a scenario similar to the one reported
by Ben Combee where libcurl would send the wrong cookie to a redirected
- server. libcurl was doing the right thing in this test case.
+ server. libcurl was doing the right thing in these test cases.
Michal Marek (7 Apr 2008)
- Fix the MIT / Heimdal check for good:
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+followlocation
+cookies
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 301 This is a weirdo text message\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Location: ../data/10250002.txt\r
+Set-Cookie: firstcookie=want; path=/want/\r
+Content-Length: 69\r
+\r
+This server reply is for testing a Location: following with cookies
+
+</data>
+<data2>
+HTTP/1.1 301 This is a weirdo text message\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Location: ../want/10250003.txt\r
+Set-Cookie: nextcookie=data; path=/data/\r
+Content-Length: 69\r
+\r
+This server reply is for testing a Location: following with cookies
+
+</data2>
+<data3>
+HTTP/1.1 200 Followed here fine\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 52\r
+\r
+If this is received, the location following worked
+
+</data3>
+<datacheck>
+HTTP/1.1 301 This is a weirdo text message\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Location: ../data/10250002.txt\r
+Set-Cookie: firstcookie=want; path=/want/\r
+Content-Length: 69\r
+\r
+HTTP/1.1 301 This is a weirdo text message\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Location: ../want/10250003.txt\r
+Set-Cookie: nextcookie=data; path=/data/\r
+Content-Length: 69\r
+\r
+HTTP/1.1 200 Followed here fine\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Length: 52\r
+\r
+If this is received, the location following worked
+
+</datacheck>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP Location: following with command-line and server cookies
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/want/1025 -L -c log/jar1025 -b forcedcookie=yes
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /want/1025 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Cookie: forcedcookie=yes\r
+\r
+GET /data/10250002.txt HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Cookie: forcedcookie=yes\r
+\r
+GET /want/10250003.txt HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+Cookie: firstcookie=want; forcedcookie=yes\r
+\r
+</protocol>
+</verify>
+</testcase>