add idn for MacOS and iOS
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.htmlReceived on 2020-05-03