cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1337 7.35.0 issues with localhost

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Wed, 05 Mar 2014 17:41:14 +0000

Connect to port 0 has never worked in curl (until I just fixed it seconds ago) but has made the internal logic to pick the default port instead.

The problems with resolving "localhost" seems weird too since you're using the stock resolver and then it is up to libc to parse and understand /etc/hosts and libcurl has nothing to do with that. Can you show us the full -v output on such a failure?

---
** [bugs:#1337] 7.35.0 issues with localhost**
**Status:** open
**Created:** Sat Feb 22, 2014 11:44 PM UTC by ricker
**Last Updated:** Sat Feb 22, 2014 11:44 PM UTC
**Owner:** Daniel Stenberg
After upgrading to curl 7.35.0 and rebuilding transmission torrent server and client, the client could no longer connect to localhost:9091, it now always results in a connection refused. The only way I could get it to connect was to remove one of the following lines from my /etc/hosts:
     ::1             localhost
    fe80::1%lo0     localhost
But those are standard mappings, so removing them could result in more widespread issues. I was instead able to work arround the issue by having transmission connect to 127.0.0.1 instead of localhost.
I ran into another issue that is probably related, when trying to install a new version of a perl module that wraps curl (LWP::Protocol::Net::Curl). The module includes a test to verify error-handling by trying to connect to a non-existent server at 127.0.0.1:0, but curl is somehow instead connecting to my local webserver on port 80. Even with the standard curl client. No other http client I tried experiences this problem, the others all result in the expected "can't connect" error.
    $ curl  http://127.0.0.1:0/
    <html><body><h1>It works!</h1></body></html>
    $ curl  http://127.0.0.1:1337/
    curl: (7) Failed to connect to 127.0.0.1 port 1337: Connection refused
Neither of these problems existed with 7.34.0. I'm running OS X 10.9, curl @7.35.0_0+ssl is installed from Macports.
$ curl -V
curl 7.35.0 (x86_64-apple-darwin13.0.0) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.26
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-03-05

These mail archives are generated by hypermail.

donate! Page updated December 29, 2013.
web site info

File upload with ASP.NET