cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [ curl-Bugs-1600447 ] Active FTP upload/download with multi interface.

From: Alexey Simak <alexeysimak_at_gmail.com>
Date: Wed, 22 Nov 2006 17:15:54 +0200

Hi,

Thanks for quick response! Please have a look at my comments below.

> That particular problem was fixed, as you can see in that thread.
As far as I understood there were some strange things which were not
explained
(http://curl.haxx.se/mail/lib-2006-06/0055.html):
        ...
       strange thing...
       the lib525 tool against a localhost ProFTPD (1.2.10) on debian stable
       also works for me,
       but not to a remote one (legolas: ProFTPD 1.2.10 - debian stable).
       ...

> What does it mean when a "process hangs up" ? You mean that it hangs (for
a
> long time)?
Yes, I mean that it hangs untill connection timeout expires. Here is the
complete output:
        * About to connect() to ftp.sunet.se port 21 (#0)
        * Trying 194.71.11.70... * Connected to ftp.sunet.se
(194.71.11.70) port 21 (#
        0)
        < 220 Welcome to ftp.sunet.se
> USER anonymous
        < 331 Any password will work
> PASS curl_by_daniel_at_haxx.se
        < 230 Any password will work
> PWD
        < 257 "/" is your current location
        * Entry path is '/'
> CWD pub
        < 250 OK. Current directory is /pub
> CWD www
        < 250 OK. Current directory is /pub/www
> CWD utilities
        < 250 OK. Current directory is /pub/www/utilities
> CWD curl
        < 250 OK. Current directory is /pub/www/utilities/curl
        * Telling server to connect to 85.202.18.127:2221
> PORT 85,202,18,127,8,173
        < 200 PORT command successful
        * Connect data stream actively
        * Connection time-out after 300219 ms
        * Remembering we are in dir pub/www/utilities/curl/
        * Connection #0 to host ftp.sunet.se left intact
        Press any key to continue

>Can you please show us that change with diff -u?
--- multi.c 2006-11-22 16:18:26.000000000 +0200
+++ multi-fixed.c 2006-11-21 17:07:34.000000000 +0200
@@ -1057,11 +1057,14 @@
       break;

     case CURLM_STATE_DO_MORE:
- /* Ready to do more? */
- easy->result = Curl_is_connected(easy->easy_conn,
- SECONDARYSOCKET,
- &connected);
- if(connected) {
+ if(!easy->easy_conn->data->set.ftp_use_port) {
+ /* Ready to do more? */
+ easy->result = Curl_is_connected(easy->easy_conn,
+ SECONDARYSOCKET,
+ &connected);
+ }
+
+ if(connected || easy->easy_conn->data->set.ftp_use_port ) {
         /*
          * When we are connected, DO MORE and then go DO_DONE
          */

> Are you saying that your server(s) are not connecting to the client after
STOR
> is sent?
No, FTP server is connecting to the client after STOR or RETR is sent.
The problem is that client does not send STOR or RETR after PORT
(as shown in the output above).

> Aren't we already doing FTP PORT nicely in the test suite? Why does it
work
> there and not for you?
I will check your test case for active FTP mode( lib525.c - right ? ) and
inform you about results a bit later.

Thanks,
Alexey Simak
Received on 2006-11-22