Skip to content

Avoid Uri creation in HttpRuleParser.IsValidHostName #63640

@geoffkizer

Description

@geoffkizer

This function validates the given host name by actually trying to create a Uri object and seeing if it fails. It also has to construct and allocate a string to pass to the Uri.TryCreate method.

We should be able to validate a hostname directly, without actually constructing a Uri.

The main place this is used is when setting the Host property on the request message headers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions