1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP proxy 7HTTP proxy Basic auth 8followlocation 9--location-trusted 10</keywords> 11</info> 12 13# 14# Server-side 15<reply> 16<data> 17HTTP/1.1 302 OK 18Date: Thu, 09 Nov 2010 14:49:00 GMT 19Server: test-server/fake swsclose 20Content-Type: text/html 21Funny-head: yesyes 22Location: http://goto.second.host.now/2340002 23Content-Length: 8 24Connection: close 25 26contents 27</data> 28<data2> 29HTTP/1.1 200 OK 30Date: Thu, 09 Nov 2010 14:49:00 GMT 31Server: test-server/fake swsclose 32Content-Type: text/html 33Funny-head: yesyes 34Content-Length: 9 35 36contents 37</data2> 38 39<datacheck> 40HTTP/1.1 302 OK 41Date: Thu, 09 Nov 2010 14:49:00 GMT 42Server: test-server/fake swsclose 43Content-Type: text/html 44Funny-head: yesyes 45Location: http://goto.second.host.now/2340002 46Content-Length: 8 47Connection: close 48 49HTTP/1.1 200 OK 50Date: Thu, 09 Nov 2010 14:49:00 GMT 51Server: test-server/fake swsclose 52Content-Type: text/html 53Funny-head: yesyes 54Content-Length: 9 55 56contents 57</datacheck> 58</reply> 59 60# 61# Client-side 62<client> 63<server> 64http 65</server> 66 <name> 67HTTP, proxy, site+proxy auth and Location: to new host using location-trusted 68 </name> 69 <command> 70http://first.host.it.is/we/want/that/page/234 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location-trusted 71</command> 72</client> 73 74# 75# Verify data after the test has been "shot" 76<verify> 77<strip> 78^User-Agent:.* 79</strip> 80<protocol> 81GET http://first.host.it.is/we/want/that/page/234 HTTP/1.1 82Host: first.host.it.is 83Proxy-Authorization: Basic dGVzdGluZzp0aGlz 84Authorization: Basic aWFtOm15c2VsZg== 85Accept: */* 86Proxy-Connection: Keep-Alive 87 88GET http://goto.second.host.now/2340002 HTTP/1.1 89Host: goto.second.host.now 90Proxy-Authorization: Basic dGVzdGluZzp0aGlz 91Authorization: Basic aWFtOm15c2VsZg== 92Accept: */* 93Proxy-Connection: Keep-Alive 94 95</protocol> 96</verify> 97</testcase> 98