Skip to content

libcurl doesn't detect an FTP 426 response #405

@booboo0706

Description

@booboo0706

I'm encountering this problem while uploading files to a Filezilla FTP server.
The server responds with 150 to the STOR command, however the data connection is not available immediately and the server aborts connection by sending a 426 response back. This response is not caught by libcurl.
This problem is similar to the one already reported here:
http://sourceforge.net/p/curl/bugs/1436/

libcurl log:

Debug output from the previous transfer (upload test1.jpg):

incoming header: 226 Successfully transferred "/test1.jpg"
Connection #0 to host 192.168.0.100 left intact
transfer done ftp://192.168.0.100:21/test1.jpg (No error-0)
Expire cleared

Upload test2.jpg

STATE: INIT => CONNECT handle 0x7195e508; line 1090 (connection #-5000)
Found bundle for host 192.168.0.100: 0x7191ffc8
Re-using existing connection! (#0) with host 192.168.0.100
Connected to 192.168.0.100 (192.168.0.100) port 21 (#0)
STATE: CONNECT => DO handle 0x7195e508; line 1136 (connection #0)
Request has same path as previous transfer
DO phase starts
Hostname 192.168.0.90 was found in DNS cache
outgoing header: EPRT |1|192.168.0.90|41546|
FTP 0x7196fec0 (line 1342) state change from STOP to PORT
ftp_perform ends with SECONDARY: 1
STATE: DO => DOING handle 0x7195e508; line 1324 (connection #0)
incoming header: 200 Port command successful
Connect data stream actively
FTP 0x7196fec0 (line 2132) state change from PORT to STOP
DO phase is complete2
STATE: DOING => DO_MORE handle 0x7195e508; line 1413 (connection #0)
FTP 0x7196fec0 (line 3533) state change from STOP to STOR_TYPE
outgoing header: STOR test2.jpg
FTP 0x7196fec0 (line 1711) state change from STOR_TYPE to STOR
incoming header: 150 Opening data channel for file upload to server of "/test2.jpg"
FTP 0x7196fec0 (line 2447) state change from STOR to STOP
Preparing for accepting server on data port
Checking for server connect
Data conn was not available immediately
STATE: DO_MORE => DO_DONE handle 0x7195e508; line 1439 (connection #0)
STATE: DO_DONE => WAITPERFORM handle 0x7195e508; line 1464 (connection #0)
STATE: WAITPERFORM => PERFORM handle 0x7195e508; line 1474 (connection #0)
STATE: PERFORM => DONE handle 0x7195e508; line 1632 (connection #0)
Curl_done
Remembering we are in dir ""
Connection #0 to host 192.168.0.100 left intact
transfer done ftp://192.168.0.100:21/test2.jpg (No error-0)

Network trace:
220-FileZilla Server 0.9.53 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit https://filezilla-project.org/
USER test
331 Password required for test
PASS test
230 Logged on
PWD
257 "/" is current directory.
EPRT |1|192.168.0.90|41432|
200 Port command successful
TYPE I
200 Type set to I
STOR test1_00121.jpg
150 Opening data channel for file upload to server of "/test1_00121.jpg"
226 Successfully transferred "/test1_00121.jpg"
EPRT |1|192.168.0.90|55615|
200 Port command successful
STOR test1_00122.jpg
150 Opening data channel for file upload to server of "/test1_00122.jpg"
226 Successfully transferred "/test1_00122.jpg"
EPRT |1|192.168.0.90|39864|
200 Port command successful
STOR test1_00123.jpg
150 Opening data channel for file upload to server of "/test1_00123.jpg"
226 Successfully transferred "/test1_00123.jpg"
EPRT |1|192.168.0.90|44857|
200 Port command successful
STOR test1_00124.jpg
150 Opening data channel for file upload to server of "/test1_00124.jpg"
226 Successfully transferred "/test1_00124.jpg"
EPRT |1|192.168.0.90|34222|
200 Port command successful
STOR test1_00125.jpg
150 Opening data channel for file upload to server of "/test1_00125.jpg"
426 Connection closed; aborted transfer of "/test1_00125.jpg"
QUIT
221 Goodbye

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions