2007-01-23 05:25:56 +03:00
|
|
|
<testcase>
|
2005-04-17 03:15:19 +04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
cookies
|
|
|
|
cookiejar
|
|
|
|
</keywords>
|
|
|
|
</info>
|
2002-02-26 16:09:46 +03:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Server: test-server/fake
|
2003-07-20 03:57:08 +04:00
|
|
|
Content-Length: 4
|
2002-02-26 16:09:46 +03:00
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes
|
2003-04-30 21:16:25 +04:00
|
|
|
Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure
|
2002-07-30 02:21:37 +04:00
|
|
|
Set-Cookie:ismatch=this ; domain=127.0.0.1; path=/silly/
|
2011-08-09 16:02:05 +04:00
|
|
|
Set-Cookie: sec1value=secure1 ; domain=127.0.0.1; path=/secure1/ ; secure
|
|
|
|
Set-Cookie: sec2value=secure2 ; domain=127.0.0.1; path=/secure2/ ; secure=
|
|
|
|
Set-Cookie: sec3value=secure3 ; domain=127.0.0.1; path=/secure3/ ; secure=
|
2012-11-16 16:54:59 +04:00
|
|
|
Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ;
|
|
|
|
Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ;
|
|
|
|
Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ;
|
|
|
|
Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ;
|
|
|
|
Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ;
|
|
|
|
Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/;
|
|
|
|
Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly
|
|
|
|
Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly=
|
|
|
|
Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/;
|
|
|
|
Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/;
|
|
|
|
Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly
|
|
|
|
Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure
|
|
|
|
Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure
|
|
|
|
Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure=
|
|
|
|
Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure=
|
|
|
|
Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly=
|
|
|
|
Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly=
|
|
|
|
Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly
|
2011-08-09 16:02:05 +04:00
|
|
|
Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly
|
2002-02-26 16:09:46 +03:00
|
|
|
Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;
|
2002-07-30 02:21:37 +04:00
|
|
|
Set-Cookie:eat=this; domain=moo.foo.moo;
|
2002-02-26 16:18:39 +03:00
|
|
|
Set-Cookie: eat=this-too; domain=.foo.moo;
|
2002-02-26 16:09:46 +03:00
|
|
|
Set-Cookie: nodomainnovalue
|
2007-02-05 05:38:25 +03:00
|
|
|
Set-Cookie: nodomain=value; expires=Fri Feb 2 11:56:27 GMT 2035
|
2003-04-30 21:16:25 +04:00
|
|
|
Set-Cookie: novalue; domain=reallysilly
|
2007-02-05 05:38:25 +03:00
|
|
|
Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
|
|
|
|
Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030
|
2008-01-31 15:21:57 +03:00
|
|
|
Set-Cookie: magic=yessir; path=/silly/; HttpOnly
|
2012-11-16 16:54:59 +04:00
|
|
|
Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
|
2002-02-26 16:09:46 +03:00
|
|
|
|
|
|
|
boo
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
2003-05-01 00:25:39 +04:00
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
2002-02-26 16:09:46 +03:00
|
|
|
<name>
|
|
|
|
HTTP with weirdly formatted cookies and cookiejar storage
|
|
|
|
</name>
|
2007-07-11 02:27:16 +04:00
|
|
|
# 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>
|
2002-02-26 16:09:46 +03:00
|
|
|
<command>
|
2004-09-08 12:08:38 +04:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
|
2002-02-26 16:09:46 +03:00
|
|
|
</command>
|
2012-11-18 17:55:29 +04:00
|
|
|
<precheck>
|
|
|
|
perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}'
|
|
|
|
</precheck>
|
2005-01-26 00:45:03 +03:00
|
|
|
</client>
|
2002-02-26 16:09:46 +03:00
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<strip>
|
|
|
|
^User-Agent:.*
|
|
|
|
</strip>
|
|
|
|
<protocol>
|
|
|
|
GET /we/want/31 HTTP/1.1
|
2007-09-14 23:32:31 +04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-02-09 15:46:41 +03:00
|
|
|
Accept: */*
|
2002-02-26 16:09:46 +03:00
|
|
|
|
|
|
|
</protocol>
|
2007-01-23 05:25:56 +03:00
|
|
|
<file name="log/jar31.txt" mode="text">
|
2002-02-26 16:09:46 +03:00
|
|
|
# Netscape HTTP Cookie File
|
2012-07-03 13:27:45 +04:00
|
|
|
# http://curl.haxx.se/docs/http-cookies.html
|
2002-02-26 16:09:46 +03:00
|
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
|
2003-04-30 21:16:25 +04:00
|
|
|
.127.0.0.1 TRUE /silly/ FALSE 0 ismatch this
|
2011-08-09 16:02:05 +04:00
|
|
|
.127.0.0.1 TRUE /secure1/ TRUE 0 sec1value secure1
|
|
|
|
.127.0.0.1 TRUE /secure2/ TRUE 0 sec2value secure2
|
|
|
|
.127.0.0.1 TRUE /secure3/ TRUE 0 sec3value secure3
|
|
|
|
.127.0.0.1 TRUE /secure4/ TRUE 0 sec4value secure4
|
|
|
|
.127.0.0.1 TRUE /secure5/ TRUE 0 sec5value secure5
|
|
|
|
.127.0.0.1 TRUE /secure6/ TRUE 0 sec6value secure6
|
|
|
|
.127.0.0.1 TRUE /secure7/ TRUE 0 sec7value secure7
|
|
|
|
.127.0.0.1 TRUE /secure8/ TRUE 0 sec8value secure8
|
|
|
|
.127.0.0.1 TRUE /secure9/ TRUE 0 secure very1
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p1/ FALSE 0 httpo1 value1
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p2/ FALSE 0 httpo2 value2
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p3/ FALSE 0 httpo3 value3
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httpo4 value4
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httponly myvalue1
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec myvalue2
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec2 myvalue3
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec3 myvalue4
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec4 myvalue5
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec5 myvalue6
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec6 myvalue7
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec7 myvalue8
|
|
|
|
#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec8 myvalue9
|
2003-04-30 21:16:25 +04:00
|
|
|
.127.0.0.1 TRUE / FALSE 0 partmatch present
|
2007-02-05 05:38:25 +03:00
|
|
|
127.0.0.1 FALSE /we/want/ FALSE 2054030187 nodomain value
|
2008-01-31 15:21:57 +03:00
|
|
|
#HttpOnly_127.0.0.1 FALSE /silly/ FALSE 0 magic yessir
|
2009-10-25 21:15:14 +03:00
|
|
|
.0.0.1 TRUE /we/want/ FALSE 0 blexp yesyes
|
2002-02-26 16:09:46 +03:00
|
|
|
</file>
|
|
|
|
</verify>
|
2007-01-23 05:25:56 +03:00
|
|
|
</testcase>
|