-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
iOS/tvOS/MacCatalyst: some HttpClientHandler properties behave differently now #55986
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
@rolfbjarne What we are doing with
I don't think any of these features the three properties reference are supported by
Was the callback actually invoked from the handler?
We're deferring to the native handler for any defaults. You'll need to initialize them in your handler. |
OK, I think I was confused, and hopefully I've figured things out now. In legacy Xamarin, we can select at build time which handler is the default for In .NET, we can select at build time which implementation In our tests we were doing "new HttpClientHandler ()", and assuming that that would get us a specific implementation. In .NET that's not true anymore, it depends on a build-time option. The end result is that we'll have to update our tests, and afaik there's nothing to do here. |
Reopening again, because I'm not sure I understand the rationale here:
This means that if you disable the native handler (set Shouldn't those properties instead do whatever the underlying handler does, instead of assuming that if they aren't supported in NSUrlSessionHandler, they won't be supported in SocketsHttpHandler either? |
Good point. We thought to do PNSE mostly because |
The same has been done to the browser http handler last year: #39760 |
That shouldn't be a problem. |
Since HttpClientHandler on mobile can support both the underlying native handler and SocketsHttpHandler, it doesn't make sense to always throw PNSE on some methods due to only the native handler not supporting them. Fixes dotnet#55986
Since HttpClientHandler on mobile can support both the underlying native handler and SocketsHttpHandler, it doesn't make sense to always throw PNSE on some methods due to only the native handler not supporting them. Fixes #55986 Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Description
I'm not sure if this is a bug or expected behavior now, but I'm filing this issue to track whatever it is.
This happens on iOS, tvOS or Mac Catalyst (not macOS).
Supports*
properties all returnfalse
now, they used to returntrue
. The corresponding supported properties throwPlatformNotSupportedException
(which I guess is understandable if they're not supported).ServerCertificateValidationCallback
throws a PNSE. This used to work.Regression?
Yes, it happened sometime between 6.0.100-preview.7.21330.1 and 6.0.100-rc.1.21369.3 (it's also a breaking change from legacy Xamarin).
The text was updated successfully, but these errors were encountered: