Skip to content

Fix request absolute URI handling#2842

Merged
tsegismont merged 1 commit intovert-x3:4.xfrom
tsegismont:backport-2833-4.x
Jan 23, 2026
Merged

Fix request absolute URI handling#2842
tsegismont merged 1 commit intovert-x3:4.xfrom
tsegismont:backport-2833-4.x

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 merged commit 5ec7457 into vert-x3:4.x Jan 23, 2026
8 checks passed
@tsegismont tsegismont deleted the backport-2833-4.x branch January 23, 2026 13:38
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