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