1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6redirect_url
7followlocation
8--write-out
9</keywords>
10</info>
11
12# Server-side
13<reply>
14<data nocheck="yes">
15HTTP/1.1 301 This is a weirdo text message swsclose
16Location: data/10810099.txt?coolsite=yes
17Content-Length: 62
18Connection: close
19
20This server reply is for testing a simple Location: following
21</data>
22<data2 nocheck="yes">
23HTTP/1.1 200 Followed here fine swsclose
24Date: Thu, 09 Nov 2010 14:49:00 GMT
25Server: test-server/fake
26Content-Length: 41
27
28This second URL does not have a location
29</data2>
30</reply>
31
32# Client-side
33<client>
34<server>
35http
36</server>
37 <name>
38HTTP no Location: on second URL 'redirect_url' check
39 </name>
40 <command>
41http://%HOSTIP:%HTTPPORT/we/want/our/1081 http://%HOSTIP:%HTTPPORT/we/want/our/10810002 -w '%{redirect_url}\n'
42</command>
43</client>
44
45# Verify data after the test has been "shot"
46<verify>
47<strip>
48^User-Agent:.*
49</strip>
50<protocol>
51GET /we/want/our/1081 HTTP/1.1
52Host: %HOSTIP:%HTTPPORT
53Accept: */*
54
55GET /we/want/our/10810002 HTTP/1.1
56Host: %HOSTIP:%HTTPPORT
57Accept: */*
58
59</protocol>
60<stdout mode="text">
61HTTP/1.1 301 This is a weirdo text message swsclose
62Location: data/10810099.txt?coolsite=yes
63Content-Length: 62
64Connection: close
65
66This server reply is for testing a simple Location: following
67http://%HOSTIP:%HTTPPORT/we/want/our/data/10810099.txt?coolsite=yes
68HTTP/1.1 200 Followed here fine swsclose
69Date: Thu, 09 Nov 2010 14:49:00 GMT
70Server: test-server/fake
71Content-Length: 41
72
73This second URL does not have a location
74
75</stdout>
76</verify>
77</testcase>
78