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