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