Revert "Update to 7.44.0"
[platform/upstream/curl.git] / tests / data / test31
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 cookies
7 cookiejar
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 200 OK\r
14 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
15 Server: test-server/fake\r
16 Content-Length: 4\r
17 Content-Type: text/html\r
18 Funny-head: yesyes\r
19 Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure\r
20 Set-Cookie:ismatch=this  ; domain=127.0.0.1; path=/silly/\r
21 Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/\r
22 Set-Cookie: overwrite=this2  ; domain=127.0.0.1; path=/overwrite\r
23 Set-Cookie: sec1value=secure1  ; domain=127.0.0.1; path=/secure1/ ; secure\r
24 Set-Cookie: sec2value=secure2  ; domain=127.0.0.1; path=/secure2/ ; secure=\r
25 Set-Cookie: sec3value=secure3  ; domain=127.0.0.1; path=/secure3/ ; secure=\r
26 Set-Cookie: sec4value=secure4  ; secure=; domain=127.0.0.1; path=/secure4/ ; \r
27 Set-Cookie: sec5value=secure5  ; secure; domain=127.0.0.1; path=/secure5/ ; \r
28 Set-Cookie: sec6value=secure6  ; secure ; domain=127.0.0.1; path=/secure6/ ; \r
29 Set-Cookie: sec7value=secure7  ; secure   ; domain=127.0.0.1; path=/secure7/ ; \r
30 Set-Cookie: sec8value=secure8  ; secure= ; domain=127.0.0.1; path=/secure8/ ; \r
31 Set-Cookie: secure=very1  ; secure=; domain=127.0.0.1; path=/secure9/; \r
32 Set-Cookie: httpo1=value1  ; domain=127.0.0.1; path=/p1/; httponly\r
33 Set-Cookie: httpo2=value2  ; domain=127.0.0.1; path=/p2/; httponly=\r
34 Set-Cookie: httpo3=value3  ; httponly; domain=127.0.0.1; path=/p3/;\r
35 Set-Cookie: httpo4=value4  ; httponly=; domain=127.0.0.1; path=/p4/; \r
36 Set-Cookie: httponly=myvalue1  ; domain=127.0.0.1; path=/p4/; httponly\r
37 Set-Cookie: httpandsec=myvalue2  ; domain=127.0.0.1; path=/p4/; httponly; secure\r
38 Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure\r
39 Set-Cookie: httpandsec3=myvalue4  ; domain=127.0.0.1; path=/p4/; httponly; secure=\r
40 Set-Cookie: httpandsec4=myvalue5  ; domain=127.0.0.1; path=/p4/; httponly=; secure=\r
41 Set-Cookie: httpandsec5=myvalue6  ; domain=127.0.0.1; path=/p4/; secure; httponly=\r
42 Set-Cookie: httpandsec6=myvalue7  ; domain=127.0.0.1; path=/p4/; secure=; httponly=\r
43 Set-Cookie: httpandsec7=myvalue8  ; domain=127.0.0.1; path=/p4/; secure; httponly\r
44 Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly\r
45 Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;\r
46 Set-Cookie:eat=this; domain=moo.foo.moo;\r
47 Set-Cookie: eat=this-too; domain=.foo.moo;\r
48 Set-Cookie: nodomainnovalue\r
49 Set-Cookie:   nodomain=value; expires=Fri Feb 2 11:56:27 GMT 2035\r
50 Set-Cookie: novalue; domain=reallysilly\r
51 Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030\r
52 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030\r
53 Set-Cookie: magic=yessir; path=/silly/; HttpOnly\r
54 Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad;\r
55 Set-Cookie: partialip=nono; domain=.0.0.1;\r
56 \r
57 boo
58 </data>
59 </reply>
60
61 # Client-side
62 <client>
63 <server>
64 http
65 </server>
66  <name>
67 HTTP with weirdly formatted cookies and cookiejar storage
68  </name>
69 # Explicitly set the time zone to a known good one, in case the user is
70 # using one of the 'right' zones that take into account leap seconds
71 # which causes the cookie expiry times to be different.
72 <setenv>
73 TZ=GMT
74 </setenv>
75  <command>
76 http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
77 </command>
78 <precheck>
79 perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
80 </precheck>
81 </client>
82
83 # Verify data after the test has been "shot"
84 <verify>
85 <strip>
86 ^User-Agent:.*
87 </strip>
88 <protocol>
89 GET /we/want/31 HTTP/1.1\r
90 Host: %HOSTIP:%HTTPPORT\r
91 Accept: */*\r
92 \r
93 </protocol>
94 <file name="log/jar31.txt" mode="text">
95 # Netscape HTTP Cookie File
96 # http://curl.haxx.se/docs/http-cookies.html
97 # This file was generated by libcurl! Edit at your own risk.
98
99 127.0.0.1       FALSE   /silly/ FALSE   0       ismatch this
100 127.0.0.1       FALSE   /overwrite      FALSE   0       overwrite       this2
101 127.0.0.1       FALSE   /secure1/       TRUE    0       sec1value       secure1
102 127.0.0.1       FALSE   /secure2/       TRUE    0       sec2value       secure2
103 127.0.0.1       FALSE   /secure3/       TRUE    0       sec3value       secure3
104 127.0.0.1       FALSE   /secure4/       TRUE    0       sec4value       secure4
105 127.0.0.1       FALSE   /secure5/       TRUE    0       sec5value       secure5
106 127.0.0.1       FALSE   /secure6/       TRUE    0       sec6value       secure6
107 127.0.0.1       FALSE   /secure7/       TRUE    0       sec7value       secure7
108 127.0.0.1       FALSE   /secure8/       TRUE    0       sec8value       secure8
109 127.0.0.1       FALSE   /secure9/       TRUE    0       secure  very1
110 #HttpOnly_127.0.0.1     FALSE   /p1/    FALSE   0       httpo1  value1
111 #HttpOnly_127.0.0.1     FALSE   /p2/    FALSE   0       httpo2  value2
112 #HttpOnly_127.0.0.1     FALSE   /p3/    FALSE   0       httpo3  value3
113 #HttpOnly_127.0.0.1     FALSE   /p4/    FALSE   0       httpo4  value4
114 #HttpOnly_127.0.0.1     FALSE   /p4/    FALSE   0       httponly        myvalue1
115 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec      myvalue2
116 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec2     myvalue3
117 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec3     myvalue4
118 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec4     myvalue5
119 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec5     myvalue6
120 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec6     myvalue7
121 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec7     myvalue8
122 #HttpOnly_127.0.0.1     FALSE   /p4/    TRUE    0       httpandsec8     myvalue9
123 127.0.0.1       FALSE   /       FALSE   0       partmatch       present
124 127.0.0.1       FALSE   /we/want/       FALSE   2054030187      nodomain        value
125 #HttpOnly_127.0.0.1     FALSE   /silly/ FALSE   0       magic   yessir
126 127.0.0.1       FALSE   /we/want/       FALSE   0       blexp   yesyes
127 </file>
128 </verify>
129 </testcase>