e8c6bed1d383797f97a1bd7e756556c742491e3b
[platform/upstream/curl.git] / tests / data / test2051
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 CURLOPT_CONNECT_TO
7 </keywords>
8 </info>
9
10 #
11 # Server-side
12 <reply>
13 <data nocheck="yes">
14 HTTP/1.1 200 OK
15 Date: Thu, 09 Nov 2010 14:49:00 GMT
16 Content-Length: 3
17 Content-Type: text/plain
18
19 OK
20 </data>
21 </reply>
22
23 #
24 # Client-side
25 <client>
26 <server>
27 http
28 </server>
29  <name>
30 Connect to specific host: Re-use existing connections if possible
31  </name>
32
33  <command>
34 http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n" --next --connect-to ::%HOSTIP:%HTTPPORT http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n" --next http://%HOSTIP:%HTTPPORT/2051 -w "%{num_connects}\n"
35 </command>
36 </client>
37
38 #
39 # Verify data after the test has been "shot"
40 <verify>
41 <strip>
42 ^User-Agent:.*
43 </strip>
44 <protocol>
45 GET /2051 HTTP/1.1\r
46 Host: %HOSTIP:%HTTPPORT\r
47 Accept: */*\r
48 \r
49 GET /2051 HTTP/1.1\r
50 Host: %HOSTIP:%HTTPPORT\r
51 Accept: */*\r
52 \r
53 GET /2051 HTTP/1.1\r
54 Host: %HOSTIP:%HTTPPORT\r
55 Accept: */*\r
56 \r
57 </protocol>
58
59 <stdout>
60 HTTP/1.1 200 OK
61 Date: Thu, 09 Nov 2010 14:49:00 GMT
62 Content-Length: 3
63 Content-Type: text/plain
64
65 OK
66 1
67 OK
68 0
69 OK
70 0
71 </stdout>
72
73 </verify>
74 </testcase>