Skip to content

Kestrel: Add proper response for invalid header values. #28248

Open
@serdartepeyurt

Description

@serdartepeyurt

Describe the bug

There was an issue with the invalid header values on requests. It took a while for us to understand that because there was no indication of what went wrong. In our end, the problem was not using the UTF-8 encoding for headers on the client (Alamofire on iOS). I guess Kestrel only supports UTF-8 or vanilla ASCII, not extensions. That's okay but the problem was there were only Status 400 code and an empty response body.

To Reproduce

Fire up a kestrel server and send this header value with any request, with ASCII encoding => DEV_NAME, "Müge's iPad"

Exceptions (if any)

There were only Status 400 code and an empty response body.

Further technical details

.NET Core version is 3.1.404
It happens on both Windows and Linux Docker containers

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewThis issue impacts only small number of customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-kestrelseverity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions