【问题标题】:Curb epsv problem遏制 epsv 问题
【发布时间】:2011-01-22 05:52:10
【问题描述】:

我在使用 Curb(ruby curl 绑定)进行 FTP 下载时遇到问题。

当扩展被动模式失败时,路边似乎不会退回到简单被动模式。日志摘录如下:

< 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

然后抛出 Curl::Err::ConnectionFailedError: could't connect to server

但是,如果我在命令行中使用 curl,我会得到

< 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

解决方案是完全禁用 epsv,但使用 Curb 似乎是不可能的,没有这样的选项。在这种情况下可以做什么?

【问题讨论】:

  • Digg 这个问题,我也遇到过这个问题——我可以在 curl 中使用 --disable-epsv 但似乎无法在 CURB 中设置?在 C API 中它显示 CURLOPT_FTP_USE_EPSV 是一个选项,但我没有看到它在遏制中可用
  • 最后我用反引号调用了正常的 curl。

标签: ruby ftp curl curb


【解决方案1】:

禁用 EPSV 的 libcurl 选项是一个简单的布尔选项,并且遏制应该已经支持许多其他类似的选项。添加对此的支持应该是相当简单的。

【讨论】:

    猜你喜欢
    • 2017-09-28
    • 2015-03-15
    • 1970-01-01
    • 2013-03-16
    • 1970-01-01
    • 2016-08-12
    • 2012-02-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多