Skip to content

Conversation

@tmonney
Copy link

@tmonney tmonney commented Dec 2, 2025

When a request uses an absolute request target with scheme and host parts, the current absoluteURI() method simply concatenates the Host header value and the request target URI. For example, with the following request:

GET http://www.example.com:1234/path HTTP/1.1
Host: www.example.com:1234

The result of HttpServerRequest.absoluteURI() would then be:

http://www.example.com:1234www.example.com:1234/path

With this change, when the request target is absolute, only the path (and query) are added to the Host value:

http://www.example.com:1234/path

Fixes #2830

When a request uses an absolute request target with scheme and host
parts, the current absoluteURI() method simply concatenates the Host
header value and the request target URI. For example, with the following
request:

```
GET http://www.example.com:1234/path HTTP/1.1
Host: www.example.com:1234
```

The result of HttpServerRequest.absoluteURI() would then be:

`http://www.example.com:1234www.example.com:1234/path`

With this change, when the request target is absolute, only the path
(and query) are added to the Host value:

`http://www.example.com:1234/path`

Fixes vert-x3#2830
Copy link
Member

@tsegismont tsegismont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a compilation problem. Can you take a look?

@vietj
Copy link
Contributor

vietj commented Jan 7, 2026

@tmonney

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ForwardedParser calculates invalid absolute URI when request target is already absolute

3 participants