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/25 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/25 25Content-Length: 32 26Connection: close 27 28HTTP/1.1 301 This is a weirdo text message 29Server: test-server/fake 30Location: data/reply/25 31Content-Length: 32 32Connection: close 33 34HTTP/1.1 301 This is a weirdo text message 35Server: test-server/fake 36Location: data/reply/25 37Content-Length: 32 38Connection: close 39 40HTTP/1.1 301 This is a weirdo text message 41Server: test-server/fake 42Location: data/reply/25 43Content-Length: 32 44Connection: close 45 46HTTP/1.1 301 This is a weirdo text message 47Server: test-server/fake 48Location: data/reply/25 49Content-Length: 32 50Connection: close 51 52HTTP/1.1 301 This is a weirdo text message 53Server: test-server/fake 54Location: data/reply/25 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/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> 80GET /want/25 HTTP/1.1 81User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 82Host: %HOSTIP:%HTTPPORT 83Accept: */* 84 85GET /want/data/reply/25 HTTP/1.1 86User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 87Host: %HOSTIP:%HTTPPORT 88Accept: */* 89 90GET /want/data/reply/data/reply/25 HTTP/1.1 91User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 92Host: %HOSTIP:%HTTPPORT 93Accept: */* 94 95GET /want/data/reply/data/reply/data/reply/25 HTTP/1.1 96User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 97Host: %HOSTIP:%HTTPPORT 98Accept: */* 99 100GET /want/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1 101User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 102Host: %HOSTIP:%HTTPPORT 103Accept: */* 104 105GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1 106User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 107Host: %HOSTIP:%HTTPPORT 108Accept: */* 109 110</protocol> 111 112<errorcode> 11347 114</errorcode> 115</verify> 116</testcase> 117