xref: /curl/tests/data/test25 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6followlocation
7--max-redirs
8</keywords>
9</info>
10# Server-side
11<reply>
12<data>
13HTTP/1.1 301 This is a weirdo text message
14Server: test-server/fake
15Location: data/reply/%TESTNUMBER
16Content-Length: 32
17Connection: close
18
19Redirect to the same URL again!
20</data>
21<datacheck>
22HTTP/1.1 301 This is a weirdo text message
23Server: test-server/fake
24Location: data/reply/%TESTNUMBER
25Content-Length: 32
26Connection: close
27
28HTTP/1.1 301 This is a weirdo text message
29Server: test-server/fake
30Location: data/reply/%TESTNUMBER
31Content-Length: 32
32Connection: close
33
34HTTP/1.1 301 This is a weirdo text message
35Server: test-server/fake
36Location: data/reply/%TESTNUMBER
37Content-Length: 32
38Connection: close
39
40HTTP/1.1 301 This is a weirdo text message
41Server: test-server/fake
42Location: data/reply/%TESTNUMBER
43Content-Length: 32
44Connection: close
45
46HTTP/1.1 301 This is a weirdo text message
47Server: test-server/fake
48Location: data/reply/%TESTNUMBER
49Content-Length: 32
50Connection: close
51
52HTTP/1.1 301 This is a weirdo text message
53Server: test-server/fake
54Location: data/reply/%TESTNUMBER
55Content-Length: 32
56Connection: close
57
58</datacheck>
59</reply>
60
61# Client-side
62<client>
63<server>
64http
65</server>
66<name>
67looping HTTP Location: following with --max-redirs
68</name>
69<command>
70http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L --max-redirs 5
71</command>
72</client>
73
74# Verify data after the test has been "shot"
75<verify>
76<protocol>
77GET /want/%TESTNUMBER HTTP/1.1
78Host: %HOSTIP:%HTTPPORT
79User-Agent: curl/%VERSION
80Accept: */*
81
82GET /want/data/reply/%TESTNUMBER HTTP/1.1
83Host: %HOSTIP:%HTTPPORT
84User-Agent: curl/%VERSION
85Accept: */*
86
87GET /want/data/reply/data/reply/%TESTNUMBER HTTP/1.1
88Host: %HOSTIP:%HTTPPORT
89User-Agent: curl/%VERSION
90Accept: */*
91
92GET /want/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
93Host: %HOSTIP:%HTTPPORT
94User-Agent: curl/%VERSION
95Accept: */*
96
97GET /want/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
98Host: %HOSTIP:%HTTPPORT
99User-Agent: curl/%VERSION
100Accept: */*
101
102GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/%TESTNUMBER HTTP/1.1
103Host: %HOSTIP:%HTTPPORT
104User-Agent: curl/%VERSION
105Accept: */*
106
107</protocol>
108
109<errorcode>
11047
111</errorcode>
112</verify>
113</testcase>
114