mirror of
https://github.com/curl/curl.git
synced 2026-08-14 01:30:55 +03:00
- 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.
This commit is contained in:
parent
42d365f199
commit
605bbfc4c0
15 changed files with 186 additions and 5 deletions
|
|
@ -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; \
|
||||
|
|
|
|||
53
tests/data/test1107
Normal file
53
tests/data/test1107
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
FTP
|
||||
PASV
|
||||
RETR
|
||||
PRET
|
||||
</keywords>
|
||||
</info>
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
data
|
||||
to
|
||||
see
|
||||
that FTP
|
||||
works
|
||||
so does it?
|
||||
</data>
|
||||
<servercmd>
|
||||
REPLY PRET 200 fine
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
ftp
|
||||
</server>
|
||||
<name>
|
||||
FTP RETR PASV with PRET
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/1107 --ftp-pret
|
||||
</command>
|
||||
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
USER anonymous
|
||||
PASS ftp@example.com
|
||||
PWD
|
||||
PRET RETR 1107
|
||||
EPSV
|
||||
TYPE I
|
||||
SIZE 1107
|
||||
RETR 1107
|
||||
QUIT
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
45
tests/data/test1108
Normal file
45
tests/data/test1108
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
FTP
|
||||
PASV
|
||||
RETR
|
||||
PRET
|
||||
</keywords>
|
||||
</info>
|
||||
# Server-side
|
||||
<reply>
|
||||
|
||||
<servercmd>
|
||||
REPLY PRET 550 unkown command
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
ftp
|
||||
</server>
|
||||
<name>
|
||||
FTP RETR PASV with PRET not supported
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/1108 --ftp-pret
|
||||
</command>
|
||||
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
USER anonymous
|
||||
PASS ftp@example.com
|
||||
PWD
|
||||
PRET RETR 1108
|
||||
</protocol>
|
||||
# we expect that the server doesn't understand PRET
|
||||
<errorcode>
|
||||
84
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue