xref: /curl/tests/data/test1081 (revision 3fd80c7b)
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/%TESTNUMBER0099.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: Tue, 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/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER0002 -w '%{redirect_url}\n'
42</command>
43</client>
44
45# Verify data after the test has been "shot"
46<verify>
47<protocol>
48GET /we/want/our/%TESTNUMBER HTTP/1.1
49Host: %HOSTIP:%HTTPPORT
50User-Agent: curl/%VERSION
51Accept: */*
52
53GET /we/want/our/%TESTNUMBER0002 HTTP/1.1
54Host: %HOSTIP:%HTTPPORT
55User-Agent: curl/%VERSION
56Accept: */*
57
58</protocol>
59<stdout>
60HTTP/1.1 301 This is a weirdo text message swsclose
61Location: data/%TESTNUMBER0099.txt?coolsite=yes
62Content-Length: 62
63Connection: close
64
65This server reply is for testing a simple Location: following
66http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0099.txt?coolsite=yes
67HTTP/1.1 200 Followed here fine swsclose
68Date: Tue, 09 Nov 2010 14:49:00 GMT
69Server: test-server/fake
70Content-Length: 41
71
72This second URL does not have a location
73
74</stdout>
75</verify>
76</testcase>
77