curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. 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 himself.

add idn for MacOS and iOS

From: Christian Schmitz via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 3 May 2020 11:33:14 +0200

Hello,

I am happy to make a pull request for a little change in Curl_idnconvert_hostname function.

See pull request #5330
https://github.com/curl/curl/pull/5330

I had problem that libidn is not included in MacOS and while I can build it as separate library, the LGPL license doesn't allow me to directly link it into the curl library.

For Linux I wrote myself a little stub to dynamically load libidn when needed/available, so we can use curl with or without it.
(Maybe interesting to include with curl?)

For MacOS since a few versions the system accepts UTF-8 Domain names. So DNS works, but CURL uses wrong hostname for the request.
e.g.

GET / HTTP/1.1
Host: www.müller.de
Accept: */*

With the change proposed, CURL will pick the host name from DNS and then make correct query:

GET / HTTP/1.1
Host: www.xn--mller-kva.de
Accept: */*

I hope this helps and works.
Works for me and I got all changed to make "make checksrc" happy.

Sincerely
Christian

-- 
Read our blog about news on our plugins:
http://www.mbsplugins.de/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-03