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