cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: localhost problem on Mac?

From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Mon, 17 Mar 2014 20:49:53 -0500

On Mar 16, 2014, at 6:02 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> I can't seem to repeat this problem on Linux so I'd like to ask if someone on Mac can try it and see if this causes any problems? (I don't have any to try this on.)
>
> The bug is https://sourceforge.net/p/curl/bugs/1337/ and claims to make curl fail to resolve 'localhost' properly and in that case only try the IPv6 addresses.
>
> Anyone?

I'm seeing this too. It looks like it tries using IPv6, fails, and doesn't bother trying again using IPv4:

% src/curl --version
curl 7.36.0-DEV (x86_64-apple-darwin13.1.0) libcurl/7.36.0-DEV SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: Debug TrackMemory IPv6 Largefile NTLM NTLM_WB SSL libz

% src/curl -v http://localhost/
* STATE: INIT => CONNECT handle 0x7fea9a004c08; line 1026 (connection #-5000)
* Hostname was NOT found in DNS cache
* Trying ::1...
* STATE: CONNECT => WAITCONNECT handle 0x7fea9a004c08; line 1073 (connection #0)
* Connection failed
* connect to ::1 port 80 failed: Connection refused
* Trying fe80::1...
* Connection failed
* connect to fe80::1 port 80 failed: Connection refused
* Failed to connect to localhost port 80: Connection refused
* Closing connection 0
* The cache now contains 0 members
* Expire cleared
curl: (7) Failed to connect to localhost port 80: Connection refused

Nick Zitzmann
<http://www.chronosnet.com/>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-18