curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

CURLOPT_IPRESOLVE difference between 8.19.0 and 8.20.0

From: Jicea via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 3 May 2026 09:07:23 +0000

Hi all,

I've noticed a different behaviour between 8.19.0 and 8.20.0 regarding CURLOPT_IPRESOLVE
With a local sample that only listening on "::1" (IPv6 localhost), using --ipv4 / CURL_IPRESOLVE_V4 :

- Error with 8.19.0:

$ curl-8.19.0/bin/curl --ipv4 -v 'http://[::1]:8004/hello'
* Could not resolve host: ::1
* Store negative name resolve for ::1:8004
* shutting down connection #0

- OK with 8.20.0:

$ curl-8.20.0/bin/curl --ipv4 -v 'http://[::1]:8004/hello'
* Trying [::1]:8004...
* Established connection to ::1 (::1 port 8004) from ::1 port 54551
* using HTTP/1.x
> GET /hello HTTP/1.1
> Host: [::1]:8004
> User-Agent: curl/8.20.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Content-Length: 12
< Content-Type: text/html; charset=utf-8
< Date: Sun, 03 May 2026 08:51:56 GMT
< Server: Flask Server
< Via: waitress
<
* Connection #0 to host ::1:8004 left intact
Hello World!%

I wonder if this change is intentional or not, the behaviour of curl previous versions seems reasonable to me (error with only-IPv6 addresses when using --ipv4).
Tests have been made on macOS and ArchLinux.

Thanks,

Jean-Christophe









____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2026-05-03