Skip to content

Fix request absolute URI handling#2841

Merged
tsegismont merged 1 commit intovert-x3:5.0from
tsegismont:backport-2833
Jan 23, 2026
Merged

Fix request absolute URI handling#2841
tsegismont merged 1 commit intovert-x3:5.0from
tsegismont:backport-2833

Conversation

@tsegismont
Copy link
Copy Markdown
Member

Backport #2833

* Fix request absolute URI handling

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

* Update vertx-web/src/main/java/io/vertx/ext/web/impl/ForwardedParser.java

---------

Co-authored-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont added this to the 5.0.8 milestone Jan 23, 2026
@tsegismont tsegismont merged commit a1f79d4 into vert-x3:5.0 Jan 23, 2026
7 checks passed
@tsegismont tsegismont deleted the backport-2833 branch January 23, 2026 10:51
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.

2 participants