Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test1428
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP CONNECT
7 HTTP Basic auth
8 proxytunnel
9 </keywords>
10 </info>
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 <connect>
25 HTTP/1.1 200 Mighty fine indeed\r
26 \r
27 </connect>
28 <datacheck>
29 HTTP/1.1 200 Mighty fine indeed\r
30 \r
31 HTTP/1.1 200 OK
32 Date: Thu, 09 Nov 2010 14:49:00 GMT
33 Server: test-server/fake swsclose
34 Content-Type: text/html
35 Funny-head: yesyes
36 Content-Length: 9
37
38 contents
39 </datacheck>
40 </reply>
41
42 #
43 # Client-side
44 <client>
45 <server>
46 http
47 http-proxy
48 </server>
49  <name>
50 HTTP over proxy-tunnel with --proxy-header and --header
51  </name>
52  <command>
53 http://test.1428:%HTTPPORT/we/want/that/page/1428 -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self' --header "header-type: server" --proxy-header "header-type: proxy"
54 </command>
55 </client>
56
57 #
58 # Verify data after the test has been "shot"
59 <verify>
60 <strip>
61 ^User-Agent:.*
62 </strip>
63 <proxy>
64 CONNECT test.1428:%HTTPPORT 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: test.1428:%HTTPPORT\r
67 Proxy-Connection: Keep-Alive\r
68 header-type: proxy\r
69 \r
70 </proxy>
71 <protocol>
72 GET /we/want/that/page/1428 HTTP/1.1\r
73 Authorization: Basic aWFtOm15OjtzZWxm\r
74 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
75 Host: test.1428:%HTTPPORT\r
76 Accept: */*\r
77 header-type: server\r
78 \r
79 </protocol>
80 </verify>
81 </testcase>