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