diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-14 17:47:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-15 08:28:56 +0200 |
commit | c6ce51169e8e9590b5d25a0b567c674203bda342 (patch) | |
tree | 8d948bfce93ed5008c2f3f5020dddd3e1e190e0d /tests/data | |
parent | a3b0699d5c110270f09ac51b5b465ca8753b35a9 (diff) |
test1631: verify FTP download through HTTPS-proxy
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/Makefile.inc | 2 | ||||
-rw-r--r-- | tests/data/test1631 | 87 |
2 files changed, 88 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index bb6bf0f2f..2d6c7323a 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -195,7 +195,7 @@ test1608 test1609 test1610 test1611 test1612 \ \ test1620 test1621 \ \ -test1630 \ +test1630 test1631 \ \ test1650 test1651 test1652 test1653 test1654 test1655 \ \ diff --git a/tests/data/test1631 b/tests/data/test1631 new file mode 100644 index 000000000..cd36b1d9b --- /dev/null +++ b/tests/data/test1631 @@ -0,0 +1,87 @@ +<testcase> +<info> +<keywords> +FTP +HTTPS-proxy +</keywords> +</info> + +# Server-side +<reply> + +# This is the HTTPS proxy response +<connect> +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
+
+</connect> + +# This is the FTP server response. The Life and Adventures of Robinson Crusoe +<data> +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. +</data> +</reply> + +# Client-side +<client> +<server> +ftp +https-proxy +</server> + <name> +FTP through HTTPS-proxy + </name> + <command> +-p -x https://%HOSTIP:%HTTPSPROXYPORT ftp://ftp.site.thru.https.proxy:%FTPPORT/1631 --proxy-insecure +</command> +<features> +proxy +</features> +</client> + +# Verify data after the test has been "shot" +<verify> + +# The second CONNECT will be made to the dynamic port number the FTP server +# opens for us, so we can't compare with a known pre-existing number! +<strippart> +s/((https.proxy):(\d+))/$2:12345/ +s/^(User-Agent: curl).*/$1/ +</strippart> +<proxy> +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
+
+</proxy> +<protocol> +USER anonymous
+PASS ftp@example.com
+PBSZ 0
+PROT P
+PWD
+EPSV
+TYPE I
+SIZE 1631
+RETR 1631
+QUIT
+</protocol> +</verify> +</testcase> |