cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1436 ftp upload fails: "server did not report OK, got 150" when server replied 226

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Wed, 22 Oct 2014 12:37:09 +0000

- **labels**: libucrl --> libcurl, ftp
- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -3,7 +3,7 @@
 
 I am triggering this error when uploading files to a FTP server(filezilla in Windows in this case) and when poll(in select.c) returns 0 and "Data conn was not available immediately" happens.
 
-The problem is clearly visible in the attached Wireshark log. The TCP connection for the data trabsfer is established but then libcurl sends RESET and another try to send the same file is made. This second try results in success but libcurl insists on getting 150 when it gets 226.
+The problem is clearly visible in the attached Wireshark log. The TCP connection for the data transfer is established but then libcurl sends RESET and another try to send the same file is made. This second try results in success but libcurl insists on getting 150 when it gets 226.
 
 I suspect that the 150 result is a left-over from the previous upload. Basically a return code that was not properly cleared.
 

~~~~

- **assigned_to**: Daniel Stenberg
- **Comment**:

Thanks for your report. The libcurl.log clearly contains mysteries.

On line 579 it shows a "200 Port command successful" response from the server to the PORT command, and it then also logs a successful connect back from the server on the next line.

On line 582 it sends STOR to start the upload. And then the weirdo:

On line 583 it reads "200 Port command successful" as a response to that. It is wrong. It is actually wrong slightly before that as well.

Checking the corresponding network capture. Packet 12683 shows a "426 Connection closed; aborted transfer" which seems to come after the server has aborted the file transfer or something. That response code seems to not get read by libcurl (but I can't understand why) so it believes the transfer of image00009.jpg was fine. That's what breaks everything.

On the subsequent request, when libcurl connects and sends EPRT (line 572 in libcurl.log) it reads the 426 status which is completely out of sync, but libcurl then thinks of it as EPRT not working and tries PORT instead and then reads the EPRT response from that and that's a 200.

Can you repeat this problem?

---
** [bugs:#1436] ftp upload fails: "server did not report OK, got 150" when server replied 226**
**Status:** open
**Labels:** libcurl ftp 
**Created:** Wed Oct 22, 2014 10:15 AM UTC by Ognyan Tonchev
**Last Updated:** Wed Oct 22, 2014 10:31 AM UTC
**Owner:** Daniel Stenberg
server did not report OK, got 150
Sending error: failed to transfer data: Transferred a partial file
I am triggering this error when uploading files to a FTP server(filezilla in Windows in this case) and when poll(in select.c) returns 0 and "Data conn was not available immediately" happens.
The problem is clearly visible in the attached Wireshark log. The TCP connection for the data transfer is established but then libcurl sends RESET and another try to send the same file is made. This second try results in success but libcurl insists on getting 150 when it gets 226.
I suspect that the 150 result is a left-over from the previous upload. Basically a return code that was not properly cleared.
Attaching both, a wireshark capture log plus log messages from libcurl when the problem occurs.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-10-22

These mail archives are generated by hypermail.