Skip to content

aspnetcore/src/Http/Headers/src/HeaderUtilities.cs message incorrect and confusing #23038

Closed
@LetMeSleepAlready

Description

@LetMeSleepAlready

In the file aspnetcore/src/Http/Headers/src/HeaderUtilities.cs, method CheckValidToken(StringSegment value, string parameterName) (line 70), when there is a mismatch with the token, an exception is thrown

The format of this message is: "Invalid token '{0}.", value

Today I ran into this exception, and the message was very confusing. This is because of the ' which is not closed. The resulting message made it seem as if somehow I had an extra dot in the value parameter.

Can be fixed by changing the message to: "Invalid token '{0}'.", value
(added an extra ' after the {0} part)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoneThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions