-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDN host names: Remove the port number before converting to ACE
Closes #596
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5d7c937
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect there is a bug (related to this or something else) when libcurl is built with WinIDN.
Regarding the call to
curl_win32_idn_to_ascii()
in url.c:And in idn_win32.c +
curl_win32_idn_to_ascii()
:It is possible that
curl_win32_idn_to_ascii()
returns 1 andace_hostname
still be NULL. SinceCurl_convert_UTF8_to_wchar(in)
can fail (depending on code-page and what not).What should happen in url.c then? Or is a
host->name == NULL
handled correctly thereafter? I fail to follow all the details.5d7c937
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, I feel url.c should be patched as:
5d7c937
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right,
host->name
must not be NULL aftercurl_win32_idn_to_ascii()
has been called.I think that
curl_win32_idn_to_ascii()
should really return 0 if it has failed to convert the host name. I have created #637 for this.5d7c937
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the issue to address. Discussion moved to #637