Skip to content

[Trimming] Put code for resolving HttpMessageHandler type name behind feature switch #10743

@simonrozsival

Description

@simonrozsival

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

  1. Set AndroidHttpClientHandlerType to an assembly qualified type name
  2. This should not take precedence over UseNativeHttpHandler

Follow-up to #10002

Metadata

Metadata

Labels

Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).needs-triageIssues that need to be assigned.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions