1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP proxy 6HTTP Basic auth 7HTTP proxy Basic auth 8followlocation 9--anyauth 10--location-trusted 11</keywords> 12</info> 13 14# 15# Server-side 16<reply> 17<data1000 nocheck="yes"> 18HTTP/1.1 401 Authorization Required 19WWW-Authenticate: Basic 20Content-Type: text/plain 21Content-Length: 0 22 23</data1000> 24<data1001 nocheck="yes"> 25HTTP/1.1 302 OK 26Date: Tue, 09 Nov 2010 14:49:00 GMT 27Server: test-server/fake swsclose 28Content-Type: text/plain 29Funny-head: yesyes 30Location: http://goto.second.host.now/%TESTNUMBER1002 31Content-Length: 0 32Connection: close 33 34</data1001> 35<data1003 nocheck="yes"> 36HTTP/1.1 200 OK 37Date: Tue, 09 Nov 2010 14:49:00 GMT 38Server: test-server/fake swsclose 39Content-Type: text/plain 40Funny-head: yesyes 41Content-Length: 9 42 43contents 44</data1003> 45 46<datacheck> 47HTTP/1.1 401 Authorization Required 48WWW-Authenticate: Basic 49Content-Type: text/plain 50Content-Length: 0 51 52HTTP/1.1 302 OK 53Date: Tue, 09 Nov 2010 14:49:00 GMT 54Server: test-server/fake swsclose 55Content-Type: text/plain 56Funny-head: yesyes 57Location: http://goto.second.host.now/%TESTNUMBER1002 58Content-Length: 0 59Connection: close 60 61HTTP/1.1 200 OK 62Date: Tue, 09 Nov 2010 14:49:00 GMT 63Server: test-server/fake swsclose 64Content-Type: text/plain 65Funny-head: yesyes 66Content-Length: 9 67 68contents 69</datacheck> 70</reply> 71 72# 73# Client-side 74<client> 75<server> 76http 77</server> 78<name> 79HTTP, proxy with --anyauth and Location: to new host using location-trusted 80</name> 81<command> 82http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 -x %HOSTIP:%HTTPPORT --user iam:myself --location-trusted --anyauth 83</command> 84<features> 85proxy 86</features> 87</client> 88 89# 90# Verify data after the test has been "shot" 91<verify> 92<protocol> 93GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1 94Host: first.host.it.is 95User-Agent: curl/%VERSION 96Accept: */* 97Proxy-Connection: Keep-Alive 98 99GET http://first.host.it.is/we/want/that/page/%TESTNUMBER1000 HTTP/1.1 100Host: first.host.it.is 101Authorization: Basic aWFtOm15c2VsZg== 102User-Agent: curl/%VERSION 103Accept: */* 104Proxy-Connection: Keep-Alive 105 106GET http://goto.second.host.now/%TESTNUMBER1002 HTTP/1.1 107Host: goto.second.host.now 108Authorization: Basic aWFtOm15c2VsZg== 109User-Agent: curl/%VERSION 110Accept: */* 111Proxy-Connection: Keep-Alive 112 113</protocol> 114</verify> 115</testcase> 116