Skip to content

Commit

Permalink
FTP: CURLE_PARTIAL_FILE should not cause control connection to be closed
Browse files Browse the repository at this point in the history
Test 161 updated accordingly
  • Loading branch information
gsengun authored and bagder committed Jan 9, 2012
1 parent 2705af6 commit d28411c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ftp.c
Expand Up @@ -3287,6 +3287,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
case CURLE_FTP_ACCEPT_TIMEOUT:
case CURLE_FTP_COULDNT_SET_TYPE:
case CURLE_FTP_COULDNT_RETR_FILE:
case CURLE_PARTIAL_FILE:
case CURLE_UPLOAD_FAILED:
case CURLE_REMOTE_ACCESS_DENIED:
case CURLE_FILESIZE_EXCEEDED:
Expand Down
12 changes: 11 additions & 1 deletion tests/data/test161
@@ -1,5 +1,12 @@
<testcase>
# Server-side
<info>
<keywords>
FTP
CURLE_PARTIAL_FILE
RETR
PASV
</keywords>
</info>
<reply>
<data>
1oooooooooooooooooooooooooooooooooooooooooo2
Expand All @@ -25,6 +32,8 @@ ftp://%HOSTIP:%FTPPORT/161

# Verify data after the test has been "shot"
<verify>
# This gets QUIT sent because CURLE_PARTIAL_FILE does NOT mark the control
# connection as bad
<protocol>
USER anonymous
PASS ftp@example.com
Expand All @@ -33,6 +42,7 @@ EPSV
TYPE I
SIZE 161
RETR 161
QUIT
</protocol>
<errorcode>
18
Expand Down

0 comments on commit d28411c

Please sign in to comment.