libcurl can not correctly handle (i.e. switch to PASV) connection error while trying to establish connection in EPSV mode over SOCKS proxy.
More information here http://curl.haxx.se/mail/lib-2012-11/0073.html
Thanks for the report, this problem is now fixed in the git repository.
To try it out, you either checkout/update your git clone: http://curl.haxx.se/source.html
or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/