title: Curb epsv problem
body: <p>I'm having a problem using Curb (ruby curl bindings) for FTP downloads.</p>
  
  <p>It looks like curb doesn't fall back to simple passive mode when extended passive mode fails. Extract from the log follows:</p>
  
  <pre><code>&lt; 250 Directory changed to /outgoing/productcatalog/35591
  &gt; EPSV
  * Connect data stream passively
  &lt; 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
  </code></pre>
  
  <p>Then in throws Curl::Err::ConnectionFailedError: couldn't connect to server</p>
  
  <p>However, if I use curl in the command line, I get</p>
  
  <pre><code>&lt; 250 Directory changed to /outgoing/productcatalog/35591
  &gt; EPSV
  * Connect data stream passively
  &lt; 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
  &gt; PASV
  &lt; 227 Entering Passive Mode (216,34,207,42,169,4)
  *   Trying 216.34.207.42... connected
  </code></pre>
  
  <p>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?</p>