Git init
[external/curl.git] / tests / data / test185
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP proxy
7 followlocation
8 </keywords>
9 </info>
10
11 # Server-side
12 <reply>
13 <data>
14 HTTP/1.1 301 OK swsbounce\r
15 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
16 Content-Length: 4\r
17 Location: go/west/185\r
18 \r
19 moo
20 </data>
21 <data1>
22 HTTP/1.1 200 OK\r
23 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
24 Content-Length: 4\r
25 \r
26 moo
27 </data1>
28 <datacheck>
29 HTTP/1.1 301 OK swsbounce\r
30 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
31 Content-Length: 4\r
32 Location: go/west/185\r
33 \r
34 HTTP/1.1 200 OK\r
35 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
36 Content-Length: 4\r
37 \r
38 moo
39 </datacheck>
40 </reply>
41
42 # Client-side
43 <client>
44 <server>
45 http
46 </server>
47  <name>
48 HTTP replace Host: when following Location: on the same host
49  </name>
50  <command>
51 http://deathstar.another.galaxy/185 -L -H "Host: another.visitor.stay.a.while.stay.foreeeeeever" --proxy http://%HOSTIP:%HTTPPORT
52 </command>
53 </client>
54
55 # Verify data after the test has been "shot"
56 <verify>
57 <strip>
58 ^User-Agent: curl/.*
59 </strip>
60 <protocol>
61 GET http://deathstar.another.galaxy/185 HTTP/1.1\r
62 User-Agent: curl/7.12.2-CVS (i686-pc-linux-gnu) libcurl/7.12.2-CVS OpenSSL/0.9.6b zlib/1.1.4 libidn/0.4.6\r
63 Accept: */*\r
64 Proxy-Connection: Keep-Alive\r
65 Host: another.visitor.stay.a.while.stay.foreeeeeever\r
66 \r
67 GET http://deathstar.another.galaxy/go/west/185 HTTP/1.1\r
68 Accept: */*\r
69 Proxy-Connection: Keep-Alive\r
70 Host: another.visitor.stay.a.while.stay.foreeeeeever\r
71 \r
72 </protocol>
73
74 </verify>
75 </testcase>