-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't send server_name when literal IP #81631
Conversation
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue Detailsfixes #81590 I originally tried to use HttpClient always sets it for IP addresses. I was hoping we could check We should probably do the same for Quic when we do #80508. (not sure if Quic allows to connect to empty string)
|
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.
LGTM!
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.
LGTM! This partially fixes #79143 and will unblock System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandlerTest.GetAsync_IPv6LinkLocalAddressUri_Success
on Android 👍
fixes #81590
I originally tried to use
IPAddress.TryParse()
But it allocates and drags in many dependencies.Windows SChannel already do this so we could possibly skip it. But the check should be reasonably cheap so I left it in for all platforms.
HttpClient always sets it for IP addresses. I was hoping we could check
Uri.HostNameType
but by the time it hits theSslStream
it is already passed as string and it is part of the connection pool processing. So left the fix-up only inSslStream
.We should probably do the same for Quic when we do #80508. (not sure if Quic allows to connect to empty string)
cc: @simonrozsival @nibanks