Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.17.0
-
None
-
Unknown
Description
When using a route like this one (to forward an HTTP request to a downstream server) using the netty-http component, the query is decoded when sent to the downstream server:
from("netty-http:http://localhost:9000/service?matchOnUriPrefix=true") .to ("http4://downstream:9000/service?bridgeEndpoint=true");
A request to http://localhost:9000/service?q=%3B will result in a call to http://downstream:9000/service?q=; (notice the decoded ; character). Replacing the netty-http:http: endpoint with a jetty:http: endpoint fixes the problem.
The difference is in the use of the Exchange.HTTP_QUERY and Exchange.HTTP_RAW_QUERY headers. The jetty:http: endpoint is only setting the former header (containing the raw header value), while the netty-http:http: endpoint is using both headers.
When using bridgeEndpoint, the http4 component should prefer the raw query header over the decoded header if both headers are available.
Attachments
Issue Links
- is related to
-
CAMEL-9640 Query string gets decoded when bridging from netty*-http to netty*-http
- Resolved
-
CAMEL-9658 Path gets decoded when bridging HTTP endpoints
- Resolved
-
CAMEL-9660 HTTP producers crash when Exchange.HTTP_URI header contains unencoded unsafe characters
- Resolved