2018-11-22 07:24:02 -05:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
cookies
|
|
|
|
header dump
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# This test verifies that the cookie file gets created even if the last cookie
|
|
|
|
# has been removed - particularly important when the file is going to be read
|
|
|
|
# again and thus must not contain old contents.
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Server: test-server/fake
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes swsclose
|
2019-01-07 10:23:04 -05:00
|
|
|
Set-Cookie: foobar=name; expires=Thu, 22 Nov 2037 10:54:11 GMT;
|
2018-11-22 07:24:02 -05:00
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
|
|
Server: test-server/fake
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: yesyes swsclose
|
|
|
|
Set-Cookie: foobar=name; expires=Thu, 01 Jan 1970 00:00:00 GMT;
|
|
|
|
|
2019-03-24 10:19:50 -04:00
|
|
|
</data2>
|
2018-11-22 07:24:02 -05:00
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP with cookiejar without cookies left
|
|
|
|
</name>
|
|
|
|
<command>
|
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/327 -b none -c log/cookies327 http://%HOSTIP:%HTTPPORT/we/want/3270002
|
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
|
|
|
GET /we/want/327 HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2018-11-22 07:24:02 -05:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
GET /we/want/3270002 HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2018-11-22 07:24:02 -05:00
|
|
|
Accept: */*
|
|
|
|
Cookie: foobar=name
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
<file name="log/cookies327" mode="text">
|
|
|
|
# Netscape HTTP Cookie File
|
|
|
|
# https://curl.haxx.se/docs/http-cookies.html
|
|
|
|
# This file was generated by libcurl! Edit at your own risk.
|
|
|
|
|
|
|
|
</file>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|