Skip to content

Avoid computing FormFeature when calling HttpRequest.HasFormContentType #50153

@captainsafia

Description

@captainsafia

Currently, invoking the HttpRequest.HasFormContentType property will implicitly compute a FormFeature and use use that to compute whether the content type is form-related:

public override bool HasFormContentType
{
get { return FormFeature.HasFormContentType; }
}

We should consider updating this implementation such that it checks the content-type directly instead of allocating a feature.

cc: @davidfowl @Tratcher

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-http-abstractions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions