From ffb11ad5c69a71f12b8e28912019e87bdfa76d35 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 30 Mar 2007 01:13:47 +0000 Subject: Don't tear down the ftp connection if the maximum filesize was exceeded and added tests 290 and 291 to check. --- CHANGES | 9 +++++++++ lib/ftp.c | 1 + tests/data/Makefile.am | 2 +- tests/data/test283 | 1 + tests/data/test290 | 45 +++++++++++++++++++++++++++++++++++++++++++++ tests/data/test291 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 tests/data/test290 create mode 100644 tests/data/test291 diff --git a/CHANGES b/CHANGES index d4d9f5837..ba60cb202 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,15 @@ Changelog +Dan F (29 March 2007) +- Don't tear down the ftp connection if the maximum filesize was exceeded + and added tests 290 and 291 to check. + +- Added ftps upload and SSL required tests 401 and 402. + +- Send an EOF message before closing an SCP channel, as recommended by + RFC4254. Enable libssh2 tracing when ssh debugging is turned on. + Yang Tse (27 March 2007) - Internal function Curl_select() renamed to Curl_socket_ready() diff --git a/lib/ftp.c b/lib/ftp.c index 69243684e..4fe25dc97 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -3020,6 +3020,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status, bool premature case CURLE_FTP_COULDNT_RETR_FILE: case CURLE_FTP_COULDNT_STOR_FILE: case CURLE_FTP_ACCESS_DENIED: + case CURLE_FILESIZE_EXCEEDED: /* the connection stays alive fine even though this happened */ /* fall-through */ case CURLE_OK: /* doesn't affect the control connection's status */ diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 21345a565..205ca1c1f 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -38,4 +38,4 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test530 DISABLED test278 test279 test531 test280 test529 test532 test533 \ test534 test535 test281 test537 test282 test283 test284 test538 test285 \ test286 test307 test308 test287 test400 test288 test600 test601 test602 \ - test603 test401 test402 + test603 test401 test402 test290 test291 diff --git a/tests/data/test283 b/tests/data/test283 index e470c87fc..922de51e0 100644 --- a/tests/data/test283 +++ b/tests/data/test283 @@ -3,6 +3,7 @@ TFTP TFTP RRQ +FAILURE diff --git a/tests/data/test290 b/tests/data/test290 new file mode 100644 index 000000000..82477cba0 --- /dev/null +++ b/tests/data/test290 @@ -0,0 +1,45 @@ + + + +FTP +--max-filesize + + +# Server-side + + +85 + + + +# Client-side + + +ftp + + +FTP download maximum filesize exceeded + + +ftp://%HOSTIP:%FTPPORT/290 --max-filesize 30 + + + +# Verify data after the test has been "shot" + + +63 + + + + +USER anonymous +PASS ftp@example.com +PWD +EPSV +TYPE I +SIZE 290 +QUIT + + + diff --git a/tests/data/test291 b/tests/data/test291 new file mode 100644 index 000000000..18e039e4f --- /dev/null +++ b/tests/data/test291 @@ -0,0 +1,47 @@ + + + +FTP +RETR +--max-filesize + + +# Server-side + + +data + to + see +that FTP +works + so does it? + + + +# Client-side + + +ftp + + +FTP download maximum filesize not exceeded + + +ftp://%HOSTIP:%FTPPORT/291 --max-filesize 100 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +EPSV +TYPE I +SIZE 291 +RETR 291 +QUIT + + + -- cgit v1.2.3