From 9e95ca10b507914c33fe56862ab31cc0c6498049 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 May 2020 17:52:40 +0200 Subject: test1632: verify FTP through HTTPS-proxy with connection re-use --- tests/data/Makefile.inc | 2 +- tests/data/test1632 | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1632 diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 2d6c7323a..02a6636f2 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -195,7 +195,7 @@ test1608 test1609 test1610 test1611 test1612 \ \ test1620 test1621 \ \ -test1630 test1631 \ +test1630 test1631 test1632 \ \ test1650 test1651 test1652 test1653 test1654 test1655 \ \ diff --git a/tests/data/test1632 b/tests/data/test1632 new file mode 100644 index 000000000..b10b2a68a --- /dev/null +++ b/tests/data/test1632 @@ -0,0 +1,105 @@ + + + +FTP +HTTPS-proxy + + + +# Server-side + + +# This is the HTTPS proxy response + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Funny-head: yesyes +Content-Length: 0 + + + +# This is the FTP server response. The Life and Adventures of Robinson Crusoe + +I was born in the year 1632, in the city of York, of a good family, though not +of that country, myfather being a foreigner of Bremen, who settled first at +Hull. He got a good estate by merchandise,and leaving off his trade, lived +afterwards at York, from whence he had married my mother, whoserelations were +named Robinson, a very good family in that country, and from whom I was +calledRobinson Kreutznaer; but, by the usual corruption of words in England, +we are now called—nay wecall ourselves and write our name—Crusoe; and so my +companions always called me. + + + +I had two elder brothers, one of whom was lieutenant-colonel to an +English regiment of foot inFlanders, formerly commanded by the famous Colonel +Lockhart, and was killed at the battle nearDunkirk against the Spaniards. +What became of my second brother I never knew, any more thanmy father or +mother knew what became of me. + + + + +# Client-side + + +ftp +https-proxy + + +FTP through HTTPS-proxy, with connection re-use + + +-p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/1632 --proxy-insecure ftp://ftp.site.thru.https.proxy:%FTPPORT/16320002 + + +proxy + + + +# Verify data after the test has been "shot" + + +# The second and third CONNECT will be made to the dynamic port number the FTP +# server opens for us, so we can't compare with known pre-existing numbers! + + +s/((https.proxy):(\d+))/$2:12345/ +s/^(User-Agent: curl).*/$1/ + + +CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1 +Host: ftp.site.thru.https.proxy:12345 +User-Agent: curl +Proxy-Connection: Keep-Alive + +CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1 +Host: ftp.site.thru.https.proxy:12345 +User-Agent: curl +Proxy-Connection: Keep-Alive + +CONNECT ftp.site.thru.https.proxy:12345 HTTP/1.1 +Host: ftp.site.thru.https.proxy:12345 +User-Agent: curl +Proxy-Connection: Keep-Alive + + + +USER anonymous +PASS ftp@example.com +PBSZ 0 +PROT P +PWD +EPSV +TYPE I +SIZE 1632 +RETR 1632 +EPSV +SIZE 16320002 +RETR 16320002 +QUIT + + + -- cgit v1.2.3