Curb epsv problem

1.1k views Asked by At

I'm having a problem using Curb (ruby curl bindings) for FTP downloads.

It looks like curb doesn't fall back to simple passive mode when extended passive mode fails. Extract from the log follows:

< 250 Directory changed to /outgoing/productcatalog/35591
> EPSV
* Connect data stream passively
< 229 Entering Passive Mode (|||40938|)
*   Trying 216.34.207.42... * Connecting to 216.34.207.42 (216.34.207.42) port 40938
* Connection failed
* Expire cleared
* Closing connection #0

Then in throws Curl::Err::ConnectionFailedError: couldn't connect to server

However, if I use curl in the command line, I get

< 250 Directory changed to /outgoing/productcatalog/35591
> EPSV
* Connect data stream passively
< 229 Entering Passive Mode (|||43267|)
*   Trying 216.34.207.42... Connection refused
* couldn't connect to host
* got positive EPSV response, but can't connect. Disabling EPSV
> PASV
< 227 Entering Passive Mode (216,34,207,42,169,4)
*   Trying 216.34.207.42... connected

The solution would be to disable epsv altogether but it seems impossible with Curb, there's no such option. What can be done in this situation?

1

There are 1 answers

0
Daniel Stenberg On

The libcurl option to disable EPSV is a simple boolean option and curb should already support lots of other similar options. Adding support for this should be fairly trivial.