]> granicus.if.org Git - curl/commitdiff
FTP: CURLE_PARTIAL_FILE should not cause control connection to be closed
authorgsengun <gokhansengun@gmai.com>
Sat, 7 Jan 2012 21:13:57 +0000 (23:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 Jan 2012 21:50:20 +0000 (22:50 +0100)
Test 161 updated accordingly

lib/ftp.c
tests/data/test161

index 8f4ac1e7ff1b6b1467727d3028dbe1cd051c1304..63a0463bd90e5754d88abca9778fab0dbf1e8ef9 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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:
index bc6820ce19625376a85d271f60212306ba6e2b98..0458359988ecf4fbcdb5c571b9f5e0cfaeefd551 100644 (file)
@@ -1,5 +1,12 @@
 <testcase>
-# Server-side
+<info>
+<keywords>
+FTP
+CURLE_PARTIAL_FILE
+RETR
+PASV
+</keywords>
+</info>
 <reply>
 <data>
 1oooooooooooooooooooooooooooooooooooooooooo2
@@ -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\r
 PASS ftp@example.com\r
@@ -33,6 +42,7 @@ EPSV
 TYPE I\r
 SIZE 161\r
 RETR 161\r
+QUIT\r
 </protocol>
 <errorcode>
 18