On Sat, 9 Oct 2021, Daniel Stenberg via curl-library wrote:

The question is perhaps then if that new option should rather be A) "don't URL encode host names" or B) "don't URL encode host names that are valid IDN names".

Making it A) is way simpler and make a more predictable behavior.

I realize I'm now down in the weeds and I probably lost all of your interest by now but it struck me I should probably reverse the option:

Stick to returning the name *un*-encoded by default in URLs and introduce a new option that percents-encode the host name when the URL is retrieved.

This, to maintain the existing behavior to a larger extent. Parsing a URL with an IDN name and then again extracting the URL will then work identically as before, with the addition that it will also decode percent-encoded parts of the host name.

I'll work on this in the PR.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to