Skip to content

Requests using the absolute-form in the request line require the host to match #39335

@Tratcher

Description

@Tratcher

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

There are known clients that send the request with the full url in the request line, but then also include a malformed Host header that doesn't match. IIS/Http.Sys ignores the invalid host in this scenario, Kestrel rejects it.

Expected Behavior

Ignore the invalid/mismatched Host header.

Steps To Reproduce

GET http://www.foo.com/api/data HTTP/1.1
HOST: www.foo.comConnection: …

Produces a "400 Bad Request".

Exceptions (if any)

No response

.NET Version

6.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions