Imported Upstream version 7.50.2
[platform/upstream/curl.git] / tests / data / test1314
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 This is a weirdo text message swsbounce
15 Server: test-server/fake
16 Location: //somewhere.example.com/reply/1314
17 Content-Length: 32
18 Connection: close
19
20 Redirect to the same URL again!
21 </data>
22
23 <data1>
24 HTTP/1.1 200 okidoki
25 Server: test-server/fake
26 Content-Length: 4
27 Connection: close
28
29 moo
30 </data1>
31
32 <datacheck>
33 HTTP/1.1 301 This is a weirdo text message swsbounce
34 Server: test-server/fake
35 Location: //somewhere.example.com/reply/1314
36 Content-Length: 32
37 Connection: close
38
39 HTTP/1.1 200 okidoki
40 Server: test-server/fake
41 Content-Length: 4
42 Connection: close
43
44 moo
45 </datacheck>
46 </reply>
47
48 # Client-side
49 <client>
50 <server>
51 http
52 </server>
53  <name>
54 HTTP Location: following a // prefixed url
55  </name>
56  <command>
57 http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT
58 </command>
59 </client>
60
61 # Verify data after the test has been "shot"
62 <verify>
63 <strip>
64 ^User-Agent: curl/.*
65 </strip>
66 <protocol>
67 GET http://firstplace.example.com/want/1314 HTTP/1.1\r
68 Host: firstplace.example.com\r
69 Accept: */*\r
70 Proxy-Connection: Keep-Alive\r
71 \r
72 GET http://somewhere.example.com/reply/1314 HTTP/1.1\r
73 Host: somewhere.example.com\r
74 Accept: */*\r
75 Proxy-Connection: Keep-Alive\r
76 \r
77 </protocol>
78 </verify>
79 </testcase>