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 81 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 82 Host: %HOSTIP:%HTTPPORT 83 Accept: */* 84 85 GET /want/data/reply/25 HTTP/1.1 86 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 87 Host: %HOSTIP:%HTTPPORT 88 Accept: */* 89 90 GET /want/data/reply/data/reply/25 HTTP/1.1 91 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 92 Host: %HOSTIP:%HTTPPORT 93 Accept: */* 94 95 GET /want/data/reply/data/reply/data/reply/25 HTTP/1.1 96 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 97 Host: %HOSTIP:%HTTPPORT 98 Accept: */* 99 100 GET /want/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1 101 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 102 Host: %HOSTIP:%HTTPPORT 103 Accept: */* 104 105 GET /want/data/reply/data/reply/data/reply/data/reply/data/reply/25 HTTP/1.1 106 User-Agent: curl/7.8.1-pre3 (sparc-sun-solaris2.7) libcurl 7.8.1-pre3 (OpenSSL 0.9.6a) (krb4 enabled) 107 Host: %HOSTIP:%HTTPPORT 108 Accept: */* 109 110 </protocol> 111 112 <errorcode> 113 47 114 </errorcode> 115 </verify> 116 </testcase> 117