eclipse-vertx / eclipse-vertx/vert.x

Path header is getting appended Authority and Scheme headers instead of just URI

Open
#4,762 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
14.7k
Forks
2.1k
Avg merge
1d 10h
Merged PRs (30d)
27

Description

Hi,
I am trying some poc with proxyOptions. When I enable ProxyOptions I am getting a path header like this-
:path :HTTP://123.23.34.43:8080/abc/xyz/ijk

when i am not using, i am getting path header-
:path: /abc/xyz/ijk

Here is the code-
Vertx vertx = Vertx.vertx();

HttpClientOptions options = new HttpClientOptions();

options.setProtocolVersion(HttpVersion.HTTP_2);
options.setHttp2ClearTextUpgrade(false);
options.setProxyOptions(new ProxyOptions().setHost("172.16.10.17").setPort(8080)); //issue is here something

// Create a HTTP client.
HttpClient client = vertx.createHttpClient(options);

// Create a HTTP/2 GET request.
RequestOptions requestOptions = new RequestOptions()
.setMethod(HttpMethod.GET)
.setURI("/abc/xyz/tnk")
.setHost("172.16.9.8")
.setPort(7779);

// Send the request.
client.request(requestOptions, request -> {
request.result().end();
//request.path
});

![image](https://github.com/eclipse-vertx/vert.x/assets/100127025/841f6ade-cbed-4cdc-8662-74fe7febcc7e)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.