Skip to content

Netty: Don't set Host header port when it's the scheme's default one #899

Closed
@yatindra

Description

@yatindra

Hi,

So, this is actually not an issue, but I would like to know a workaround for this.
When the Host header in request contains the port as well Host: www.example.com:443
which is the default behaviour and which is also as per RFC, servers like IIS fail to parse it properly and return a 404 for a valid URL.
This may not be the case always, only when IIS is not configured properly.
For direct cases where I know the end URL, I usually set the Host header manually and AHC does not overwrite the value I provide.
But in cases where a redirection happens AHC will generate a new request and there I don't have control over the value. I don't have control over the original URL input as well, so updating to the correct URL is also not possible.
Example URL: https://www.chamberofcommerce.com/short-hills-nj/11218079-massage-envy-spa-short-hills-llc

Is there a workaround for this?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions