Base code merged to SPIN 2.4
[platform/upstream/curl.git] / tests / data / test61
index 49cc484..e6dbbb9 100644 (file)
@@ -1,3 +1,14 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+cookies
+cookiejar
+HTTP replaced headers
+httponly
+</keywords>
+</info>
 # Server-side
 <reply>
 <data>
@@ -6,11 +17,14 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake\r
 Content-Type: text/html\r
 Funny-head: yesyes\r
-Set-Cookie: test=yes; domain=foo.com; expires=Tue Feb 1 11:56:27 MET 2007\r
-Set-Cookie: test2=yes; domain=host.foo.com; expires=Tue Feb 1 11:56:27 MET 2007\r
+Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 2 11:56:27 GMT 2035\r
+SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035\r
 Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure\r
 Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure\r
 Set-Cookie: test5=name; domain=anything.com; path=/ ; secure\r
+Set-Cookie: fake=fooledyou; domain=..com; path=/;\r
+Set-Cookie: supercookie=fooledyou; domain=.com; path=/;^M
+Content-Length: 4\r
 \r
 boo
 </data>
@@ -24,10 +38,16 @@ http
  <name>
 HTTP with various cookies and custom Host:
  </name>
+# Explicitly set the time zone to a known good one, in case the user is
+# using one of the 'right' zones that take into account leap seconds
+# which causes the cookie expiry times to be different.
+<setenv>
+TZ=GMT
+</setenv>
  <command>
-http://%HOSTIP:%HOSTPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
+http://%HOSTIP:%HTTPPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
 </command>
-</test>
+</client>
 
 # Verify data after the test has been "shot"
 <verify>
@@ -36,18 +56,18 @@ http://%HOSTIP:%HOSTPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
 </strip>
 <protocol>
 GET /we/want/61 HTTP/1.1\r
-Pragma: no-cache\r
-Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r
+Accept: */*\r
 Host: www.host.foo.com\r
 \r
 </protocol>
-<file name="log/jar61.txt">
+<file name="log/jar61.txt" mode="text">
 # Netscape HTTP Cookie File
-# http://www.netscape.com/newsref/std/cookie_spec.html
+# http://curl.haxx.se/docs/http-cookies.html
 # This file was generated by libcurl! Edit at your own risk.
 
-.foo.com       TRUE    /we/want/       FALSE   1170327387      test    yes
-.host.foo.com  TRUE    /we/want/       FALSE   1170327387      test2   yes
+#HttpOnly_.foo.com     TRUE    /we/want/       FALSE   2054030187      test    yes
+.host.foo.com  TRUE    /we/want/       FALSE   2054030187      test2   yes
 .foo.com       TRUE    /moo    TRUE    0       test3   maybe
 </file>
 </verify>
+</testcase>