summaryrefslogtreecommitdiff
path: root/tests/data/test327
blob: 84d56f2ece1d6ad3db0c73f6b8b9a068b88d9921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<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
Set-Cookie: foobar=name; expires=Thu, 22 Nov 2037 10:54:11 GMT;

</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;

</data2>
</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
User-Agent: curl/%VERSION
Accept: */*

GET /we/want/3270002 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Cookie: foobar=name

</protocol>
<file name="log/cookies327" mode="text">
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

</file>
</verify>
</testcase>