Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test598
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP set cookie
7 cookies
8 CURLOPT_REFERER
9 curl_easy_reset
10 </keywords>
11 </info>
12 #
13 # Server-side
14 <reply>
15 <data>
16 HTTP/1.1 200 OK\r
17 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
18 Content-Length: 6\r
19 Connection: close\r
20 Content-Type: text/html\r
21 \r
22 -foo-
23 </data>
24
25 # since the request runs twice
26 <datacheck>
27 HTTP/1.1 200 OK\r
28 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
29 Content-Length: 6\r
30 Connection: close\r
31 Content-Type: text/html\r
32 \r
33 -foo-
34 HTTP/1.1 200 OK\r
35 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
36 Content-Length: 6\r
37 Connection: close\r
38 Content-Type: text/html\r
39 \r
40 -foo-
41 </datacheck>
42
43 </reply>
44
45 # Client-side
46 <client>
47 <server>
48 http
49 </server>
50 # tool is what to use instead of 'curl'
51 <tool>
52 lib598
53 </tool>
54
55  <name>
56 curl_easy_reset with referer and other strings set
57  </name>
58  <command>
59 http://%HOSTIP:%HTTPPORT/598
60 </command>
61 </client>
62
63 #
64 # Verify data after the test has been "shot"
65 <verify>
66 <protocol>
67 GET /598 HTTP/1.1\r
68 User-Agent: the-moo agent next generation\r
69 Host: %HOSTIP:%HTTPPORT\r
70 Accept: */*\r
71 Referer: http://example.com/the-moo\r
72 Cookie: name=moo\r
73 \r
74 GET /598 HTTP/1.1\r
75 Host: %HOSTIP:%HTTPPORT\r
76 Accept: */*\r
77 \r
78 </protocol>
79 </verify>
80 </testcase>