开发者

Curb epsv problem

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开发者_Go百科 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜