Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Make Idn.GetAscii compatible with Windows#24443

Merged
tarekgh merged 1 commit intodotnet:masterfrom
tarekgh:FixGetIdnAscii
May 7, 2019
Merged

Make Idn.GetAscii compatible with Windows#24443
tarekgh merged 1 commit intodotnet:masterfrom
tarekgh:FixGetIdnAscii

Conversation

@tarekgh
Copy link
Member

@tarekgh tarekgh commented May 7, 2019

GetAscii on Windows ignore if the uri has hyphens in the third and fourth places. We relaxing this on Linux too for the sake of the consistent behavior. This issue was causing some problems with the http stack.

Fixes https://github.com/dotnet/corefx/issues/29703

GetAscii on Windows ignore if the uri has hyphens in the third and fourth places. We relaxing this on Linux too for the sake of the consistent behavior. This issue was causing some problems with the http stack.
int32_t asciiStrLen = uidna_nameToASCII(pIdna, lpSrc, cwSrcLength, lpDst, cwDstLength, &info, &err);

// To have a consistent behavior with Windows, we mask out the error when having 2 hyphens in the third and fourth place.
info.errors &= ~UIDNA_ERROR_HYPHEN_3_4;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll

@tarekgh
Copy link
Member Author

tarekgh commented May 7, 2019

The failures looks Helix specific and opened a tracking issue https://github.com/dotnet/coreclr/issues/24453

https://mc.dot.net/#/user/coreclr-ci/pr~2Fdotnet~2Fcoreclr~2Frefs~2Fpull~2F24443~2Fmerge/test~2Ffunctional~2Fcli~2F/20190507.721/workItem/baseservices.threading/wilogs

Ubuntu.1804.Arm64.Open-arm64:Checked
Details from Job 360c3f70-4d7a-4e0c-b07f-f3d6d1d50ca7
ExitCode: -3
Ran on Machine: DDARM64S-024
Get Repro environment
DownloadError: Unable to download https://helixexternaldrops.blob.core.windows.net/helix-job-75691982-4ea1-4d86-9c57-2afce2333af4f1a0935b3664120aa/d2412905-594f-4a8d-b0e0-2f8901e0d4cd.zip after retrying. Execution may fail as a result.
Console
Warning! No Log Available

@tarekgh tarekgh merged commit 8b6a69e into dotnet:master May 7, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
GetAscii on Windows ignore if the uri has hyphens in the third and fourth places. We relaxing this on Linux too for the sake of the consistent behavior. This issue was causing some problems with the http stack.

Commit migrated from dotnet/coreclr@8b6a69e
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HttpClient] SSL Idn decode failure

2 participants