test536 (1136B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP proxy 7 CURLOPT_PROXY 8 CURLOPT_NOBODY 9 CURLINFO_USED_PROXY 10 </keywords> 11 </info> 12 13 # 14 # Server-side 15 <reply> 16 <data nocheck="yes"> 17 HTTP/1.1 200 OK swsclose 18 Date: Tue, 09 Nov 2010 14:49:00 GMT 19 Server: test-server/fake 20 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 21 ETag: "21025-dc7-39462498" 22 Accept-Ranges: bytes 23 Content-Length: 6 24 25 hello 26 </data> 27 </reply> 28 29 # 30 # Client-side 31 <client> 32 <server> 33 http 34 </server> 35 <tool> 36 lib%TESTNUMBER 37 </tool> 38 <name> 39 CURLINFO_USED_PROXY 40 </name> 41 42 # provides: 43 # 0 - the proxy URL 44 # 1 - the non-proxy using URL 45 # 2 - the CURLOPT_RESOLVE string to change IP for the name 46 # 47 <command> 48 http://%HOSTIP:%HTTPPORT goingdirect.com:%HTTPPORT goingdirect.com:%HTTPPORT:%HOSTIP 49 </command> 50 <features> 51 proxy 52 </features> 53 </client> 54 55 # 56 # Verify data after the test has been "shot" 57 <verify> 58 <protocol crlf="yes"> 59 GET http://usingproxy.com/ HTTP/1.1 60 Host: usingproxy.com 61 Accept: */* 62 Proxy-Connection: Keep-Alive 63 64 GET / HTTP/1.1 65 Host: goingdirect.com:%HTTPPORT 66 Accept: */* 67 68 </protocol> 69 <stdout mode="text"> 70 hello 71 This used the proxy 72 hello 73 This DID NOT use the proxy 74 </stdout> 75 </verify> 76 </testcase>