eclipse-vertx / vertx-http-proxy

vertx http proxy
Eclipse Public License 2.0
55 stars 36 forks source link

Proxied request only ignores host header with "host" in lower camel case #77

Closed joelholzerxovis closed 5 months ago

joelholzerxovis commented 5 months ago

Version

4.5.8

Context

I encountered an edge case which is not handled properly. The method sendRequest in the class ProxiedRequest ignores on line 173 the "host" header. In our application, I encountered the issue, that the "Host" header is starting with an Uppercase letter. Therefore it is added to the request on line 174, but it shouldn't.

In my opinion, line 173 should be changed to
if (!HOP_BY_HOP_HEADERS.contains(name) && !name.equalsIgnoreCase("host")) {

Hint

I can create a pull request to change this line and extend the test ProxyRequestTest#testUpdateRequestHeaders

tsegismont commented 5 months ago

Thank you @joelholzerxovis

Yes, please go ahead, I'll review your PR.

joelholzerxovis commented 5 months ago

Thank you @tsegismont! I have created a pull request. Thank you for reviewing it.

tsegismont commented 5 months ago

Fixed by #79