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 %TESTNUMBER, 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 | |
| 35 | <data2> |
| 36 | I had two elder brothers, one of whom was lieutenant-colonel to an |
| 37 | English regiment of foot inFlanders, formerly commanded by the famous Colonel |
| 38 | Lockhart, and was killed at the battle nearDunkirk against the Spaniards. |
| 39 | What became of my second brother I never knew, any more thanmy father or |
| 40 | mother knew what became of me. |
| 41 | </data2> |
| 42 | |
| 43 | </reply> |
| 44 | |
| 45 | # Client-side |
| 46 | <client> |
| 47 | <server> |
| 48 | ftp |
| 49 | https-proxy |
| 50 | </server> |
| 51 | <name> |
| 52 | FTP through HTTPS-proxy, with connection re-use |
| 53 | </name> |
| 54 | <command> |
| 55 | -p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/%TESTNUMBER0002 |
| 56 | </command> |
| 57 | <features> |
| 58 | http |
| 59 | proxy |
| 60 | </features> |
| 61 | </client> |
| 62 | |
| 63 | # Verify data after the test has been "shot" |
| 64 | <verify> |
| 65 | |
| 66 | # The second and third CONNECT will be made to the dynamic port number the FTP |
| 67 | # server opens for us, so we can't compare with known pre-existing numbers! |
| 68 | |
| 69 | <strippart> |
| 70 | s/((https.proxy):(\d+))/$2:12345/ |
| 71 | s/^(User-Agent: curl).*/$1/ |
| 72 | </strippart> |
| 73 | <proxy> |
| 74 | CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
|
| 75 | Host: ftp.site.thru.https.proxy:12345
|
| 76 | User-Agent: curl |
| 77 | Proxy-Connection: Keep-Alive
|
| 78 |
|
| 79 | CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
|
| 80 | Host: ftp.site.thru.https.proxy:12345
|
| 81 | User-Agent: curl |
| 82 | Proxy-Connection: Keep-Alive
|
| 83 |
|
| 84 | CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1
|
| 85 | Host: ftp.site.thru.https.proxy:12345
|
| 86 | User-Agent: curl |
| 87 | Proxy-Connection: Keep-Alive
|
| 88 |
|
| 89 | </proxy> |
| 90 | <protocol> |
| 91 | USER anonymous
|
| 92 | PASS ftp@example.com
|
| 93 | PWD
|
| 94 | EPSV
|
| 95 | TYPE I
|
| 96 | SIZE %TESTNUMBER
|
| 97 | RETR %TESTNUMBER
|
| 98 | EPSV
|
| 99 | SIZE %TESTNUMBER0002
|
| 100 | RETR %TESTNUMBER0002
|
| 101 | QUIT
|
| 102 | </protocol> |
| 103 | </verify> |
| 104 | </testcase> |