1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP proxy 7 followlocation 8 </keywords> 9 </info> 10 11 # Server-side 12 <reply> 13 <data> 14 HTTP/1.1 301 This is a weirdo text message swsbounce 15 Server: test-server/fake 16 Location: //somewhere.example.com/reply/1314 17 Content-Length: 32 18 Connection: close 19 20 Redirect to the same URL again! 21 </data> 22 23 <data1> 24 HTTP/1.1 200 okidoki 25 Server: test-server/fake 26 Content-Length: 4 27 Connection: close 28 29 moo 30 </data1> 31 32 <datacheck> 33 HTTP/1.1 301 This is a weirdo text message swsbounce 34 Server: test-server/fake 35 Location: //somewhere.example.com/reply/1314 36 Content-Length: 32 37 Connection: close 38 39 HTTP/1.1 200 okidoki 40 Server: test-server/fake 41 Content-Length: 4 42 Connection: close 43 44 moo 45 </datacheck> 46 </reply> 47 48 # Client-side 49 <client> 50 <server> 51 http 52 </server> 53 <name> 54 HTTP Location: following a // prefixed url 55 </name> 56 <command> 57 http://firstplace.example.com/want/1314 -L -x http://%HOSTIP:%HTTPPORT 58 </command> 59 </client> 60 61 # Verify data after the test has been "shot" 62 <verify> 63 <strip> 64 ^User-Agent: curl/.* 65 </strip> 66 <protocol> 67 GET http://firstplace.example.com/want/1314 HTTP/1.1 68 Host: firstplace.example.com 69 Accept: */* 70 71 GET http://somewhere.example.com/reply/1314 HTTP/1.1 72 Host: somewhere.example.com 73 Accept: */* 74 75 </protocol> 76 </verify> 77 </testcase> 78