Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11
Description
We support passing the HTTP message handler type name via the AndroidHttpClientHandlerType or the XA_HTTP_CLIENT_HANDLER_TYPE environment variable. This is not compatible with trimming by default and while we can make sure this type is preserved by ILLink via custom trimmer steps, there is no reasonable way to do this for NativeAOT.
I suggest disabling the handler type lookup via XA_HTTP_CLIENT_HANDLER_TYPE env variable by default and introducing a feature switch to re-enable this feature. The GetHttpMessageHandler() method would simply return an instance of AndroidMessageHandler by default.
Steps to Reproduce
- Set
AndroidHttpClientHandlerType to an assembly qualified type name
- This should not take precedence over
UseNativeHttpHandler
Follow-up to #10002
Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11
Description
We support passing the HTTP message handler type name via the
AndroidHttpClientHandlerTypeor theXA_HTTP_CLIENT_HANDLER_TYPEenvironment variable. This is not compatible with trimming by default and while we can make sure this type is preserved by ILLink via custom trimmer steps, there is no reasonable way to do this for NativeAOT.I suggest disabling the handler type lookup via
XA_HTTP_CLIENT_HANDLER_TYPEenv variable by default and introducing a feature switch to re-enable this feature. TheGetHttpMessageHandler()method would simply return an instance ofAndroidMessageHandlerby default.Steps to Reproduce
AndroidHttpClientHandlerTypeto an assembly qualified type nameUseNativeHttpHandlerFollow-up to #10002