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