1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7followlocation
8</keywords>
9</info>
10
11# Server-side
12<reply>
13<data>
14HTTP/1.1 301 This is a weirdo text message swsbounce
15Server: test-server/fake
16Location: //somewhere.example.com/reply/1314
17Content-Length: 32
18Connection: close
19
20Redirect to the same URL again!
21</data>
22
23<data1>
24HTTP/1.1 200 okidoki
25Server: test-server/fake
26Content-Length: 4
27Connection: close
28
29moo
30</data1>
31
32<datacheck>
33HTTP/1.1 301 This is a weirdo text message swsbounce
34Server: test-server/fake
35Location: //somewhere.example.com/reply/1314
36Content-Length: 32
37Connection: close
38
39HTTP/1.1 200 okidoki
40Server: test-server/fake
41Content-Length: 4
42Connection: close
43
44moo
45</datacheck>
46</reply>
47
48# Client-side
49<client>
50<server>
51http
52</server>
53 <name>
54HTTP Location: following a // prefixed url
55 </name>
56 <command>
57http://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>
67GET http://firstplace.example.com/want/1314 HTTP/1.1
68Host: firstplace.example.com
69Accept: */*
70Proxy-Connection: Keep-Alive
71
72GET http://somewhere.example.com/reply/1314 HTTP/1.1
73Host: somewhere.example.com
74Accept: */*
75Proxy-Connection: Keep-Alive
76
77</protocol>
78</verify>
79</testcase>
80