|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Feature Requests-1754793 ] graceful switch from PASV to PORT on failure
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 16 Jul 2007 14:56:24 -0700
Feature Requests item #1754793, was opened at 2007-07-16 15:59
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
There should be a way to fallback to an active connection.
When EPSV fails, libcurl gracefully falls back to PASV.
My example is using an embedded FTP server on a piece of hardware. This is how it goes:
* About to connect() to 192.168.0.2 port 21 (#0)
You can see that the EPSV failure is handled OK, but the PASV failure means the end of the connection.
RFC 959 lists the following possible responses to PASV:
PASV
I think that "502 Command not implemented." should not cause CURLE_FTP_WEIRD_PASV_REPLY. It is not "weird", merely stating that the server does not support passive connections.
This can be avoided by setting CURLOPT_FTPPORT to "-" but this is not ideal. If I don't know whether the server supports PASV or not, I would prefer it to try PASV first, then fall-back to active (PORT) like happens for EPSV.
I tried to patch the code at ftp.c:1718 but I couldn't solve it. I will try again later.
"CURLE_FTP_WEIRD_PASV_REPLY (13)
libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed. "
Is an active-only server really "flawed"? Are all servers required to support PASV?
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
Moved to the feature-request tracker.
If you want to discuss implementation details or approaches, please
----------------------------------------------------------------------
Comment By: Daniel Cater (djc0)
Message:
OK, I've changed it to a feature request. I had a look at using
----------------------------------------------------------------------
Comment By: Dan Fandrich (dfandrich)
Message:
RFC959 section 5.1 says that PASV is optional, so it looks like the server
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info