From 605bbfc4c0fa838f50bf9d18e69e417168f524c0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 1 Jan 2010 14:44:44 +0000 Subject: - Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This command is a special "hack" used by the drftpd server, but even though it is a custom extension I've deemed it fine to add to libcurl since this server seems to survive and people keep using it and want libcurl to support it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also usable from the curl tool with --ftp-pret. Using this option on a server that doesn't support this command will make libcurl fail. --- tests/data/Makefile.am | 3 ++- tests/data/test1107 | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1108 | 45 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1107 create mode 100644 tests/data/test1108 (limited to 'tests') diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index b2c4cc9b5..712e79c7d 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -63,7 +63,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test1089 test1090 test1091 test1092 test1093 test1094 test1095 test1096 \ test1097 test560 test561 test1098 test1099 test562 test563 test1100 \ test564 test1101 test1102 test1103 test1104 test299 test310 test311 \ - test312 test1105 test565 test800 test1106 test801 test566 test802 test803 + test312 test1105 test565 test800 test1106 test801 test566 test802 test803 \ + test1107 test1108 filecheck: @mkdir test-place; \ diff --git a/tests/data/test1107 b/tests/data/test1107 new file mode 100644 index 000000000..6adc6360c --- /dev/null +++ b/tests/data/test1107 @@ -0,0 +1,53 @@ + + + +FTP +PASV +RETR +PRET + + +# Server-side + + +data + to + see +that FTP +works + so does it? + + +REPLY PRET 200 fine + + + +# Client-side + + +ftp + + +FTP RETR PASV with PRET + + +ftp://%HOSTIP:%FTPPORT/1107 --ftp-pret + + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +PRET RETR 1107 +EPSV +TYPE I +SIZE 1107 +RETR 1107 +QUIT + + + diff --git a/tests/data/test1108 b/tests/data/test1108 new file mode 100644 index 000000000..7b779e11f --- /dev/null +++ b/tests/data/test1108 @@ -0,0 +1,45 @@ + + + +FTP +PASV +RETR +PRET + + +# Server-side + + + +REPLY PRET 550 unkown command + + + +# Client-side + + +ftp + + +FTP RETR PASV with PRET not supported + + +ftp://%HOSTIP:%FTPPORT/1108 --ftp-pret + + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +PRET RETR 1108 + +# we expect that the server doesn't understand PRET + +84 + + + -- cgit v1.2.3