cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HELP: how can i send POST by using IPv6 address?

From: Dirk Manske <dm_at_nonitor.de>
Date: Wed, 1 Sep 2010 16:17:35 +0200

> couldn't resolve host '3000:458:ff01:ff03:abcd:2e20:0:2'
>
> if someone know something about this
> please give me a help!
Looks like that the host is not detected as a numeric ipv6 address.
This also happens on cmdline :

# curl -v 'http://\[3000:458:ff01:ff03:abcd:2e20:0:2\]:8080/'
* Could not resolve host: 3000:458:ff01:ff03:abcd:2e20:0:2; Cannot allocate memory
* Closing connection #0
curl: (6) Could not resolve host: 3000:458:ff01:ff03:abcd:2e20:0:2; Cannot allocate memory

(btw: that error message is stupid...)

That happend both with standard and threaded resolver.
But if curl is compiled with c-ares, it looks ok:

# src/curl -v 'http://\[3000:458:ff01:ff03:abcd:2e20:0:2\]:8080/'
* About to connect() to 3000:458:ff01:ff03:abcd:2e20:0:2 port 8080 (#0)
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

So, you've found a bug.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-01