| xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> | 
 | 2 | <info> | 
 | 3 | <keywords> | 
 | 4 | FTP | 
 | 5 | HTTPS-proxy | 
 | 6 | </keywords> | 
 | 7 | </info> | 
 | 8 |  | 
 | 9 | # Server-side | 
 | 10 | <reply> | 
 | 11 |  | 
 | 12 | # This is the HTTPS proxy response | 
 | 13 | <connect> | 
 | 14 | HTTP/1.1 200 OK
 | 
 | 15 | Date: Tue, 09 Nov 2010 14:49:00 GMT
 | 
 | 16 | Server: test-server/fake
 | 
 | 17 | Content-Type: text/html
 | 
 | 18 | Funny-head: yesyes
 | 
 | 19 | Content-Length: 0
 | 
 | 20 | 
 | 
 | 21 | </connect> | 
 | 22 |  | 
 | 23 | # This is the FTP server response. The Life and Adventures of Robinson Crusoe | 
 | 24 | <data> | 
 | 25 | I was born in the year 1632, in the city of York, of a good family, though not | 
 | 26 | of that country, myfather being a foreigner of Bremen, who settled first at | 
 | 27 | Hull.  He got a good estate by merchandise,and leaving off his trade, lived | 
 | 28 | afterwards at York, from whence he had married my mother, whoserelations were | 
 | 29 | named Robinson, a very good family in that country, and from whom I was | 
 | 30 | calledRobinson Kreutznaer; but, by the usual corruption of words in England, | 
 | 31 | we are now called—nay wecall ourselves and write our name—Crusoe; and so my | 
 | 32 | companions always called me. | 
 | 33 | </data> | 
 | 34 | </reply> | 
 | 35 |  | 
 | 36 | # Client-side | 
 | 37 | <client> | 
 | 38 | <server> | 
 | 39 | ftp | 
 | 40 | https-proxy | 
 | 41 | </server> | 
 | 42 |  <name> | 
 | 43 | FTP through HTTPS-proxy | 
 | 44 |  </name> | 
 | 45 |  <command> | 
 | 46 | -p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure | 
 | 47 | </command> | 
 | 48 | <features> | 
 | 49 | http | 
 | 50 | proxy | 
 | 51 | </features> | 
 | 52 | </client> | 
 | 53 |  | 
 | 54 | # Verify data after the test has been "shot" | 
 | 55 | <verify> | 
 | 56 |  | 
 | 57 | # The second CONNECT will be made to the dynamic port number the FTP server | 
 | 58 | # opens for us, so we can't compare with a known pre-existing number! | 
 | 59 | <strippart> | 
 | 60 | s/((https.proxy):(\d+))/$2:12345/ | 
 | 61 | s/^(User-Agent: curl).*/$1/ | 
 | 62 | </strippart> | 
 | 63 | <proxy> | 
 | 64 | CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
 | 
 | 65 | Host: ftp.site.thru.https.proxy:12345
 | 
 | 66 | User-Agent: curl | 
 | 67 | Proxy-Connection: Keep-Alive
 | 
 | 68 | 
 | 
 | 69 | CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
 | 
 | 70 | Host: ftp.site.thru.https.proxy:12345
 | 
 | 71 | User-Agent: curl | 
 | 72 | Proxy-Connection: Keep-Alive
 | 
 | 73 | 
 | 
 | 74 | </proxy> | 
 | 75 | <protocol> | 
 | 76 | USER anonymous
 | 
 | 77 | PASS ftp@example.com
 | 
 | 78 | PWD
 | 
 | 79 | EPSV
 | 
 | 80 | TYPE I
 | 
 | 81 | SIZE %TESTNUMBER
 | 
 | 82 | RETR %TESTNUMBER
 | 
 | 83 | QUIT
 | 
 | 84 | </protocol> | 
 | 85 | </verify> | 
 | 86 | </testcase> |