|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-1754793 ] No graceful failure from PASV command
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 16 Jul 2007 06:59:10 -0700
Bugs item #1754793, was opened at 2007-07-16 13: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?
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info