Git init
[external/curl.git] / tests / data / test95
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 HTTP CONNECT
7 proxytunnel
8 </keywords>
9 </info>
10
11 #
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.1 200 OK
16 Date: Thu, 09 Nov 2010 14:49:00 GMT
17 Server: test-server/fake swsclose
18 Content-Type: text/html
19 Funny-head: yesyes
20 Content-Length: 9
21
22 contents
23 </data>
24 <datacheck>
25 HTTP/1.1 200 Mighty fine indeed\r
26 \r
27 HTTP/1.1 200 OK
28 Date: Thu, 09 Nov 2010 14:49:00 GMT
29 Server: test-server/fake swsclose
30 Content-Type: text/html
31 Funny-head: yesyes
32 Content-Length: 9
33
34 contents
35 </datacheck>
36 </reply>
37
38 #
39 # Client-side
40 <client>
41 <server>
42 http
43 </server>
44  <name>
45 HTTP over proxytunnel using POST
46  </name>
47  <command>
48 http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datatopost=ohthatsfunyesyes"
49 </command>
50 </client>
51
52 #
53 # Verify data after the test has been "shot"
54 <verify>
55 <strip>
56 ^User-Agent:.*
57 </strip>
58 <protocol nonewline="yes">
59 CONNECT %HOSTIP:%HTTPPORT HTTP/1.1\r
60 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
61 Host: %HOSTIP:%HTTPPORT\r
62 Proxy-Connection: Keep-Alive\r
63 \r
64 POST /we/want/that/page/95 HTTP/1.1\r
65 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3\r
66 Host: %HOSTIP:%HTTPPORT\r
67 Accept: */*\r
68 Content-Length: 27\r
69 Content-Type: application/x-www-form-urlencoded\r
70 \r
71 datatopost=ohthatsfunyesyes
72 </protocol>
73 </verify>
74 </testcase>