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