Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Apache Camel
Description
We are using org.apache.cxf.jaxrs.client.WebClient in our solution where we send a list of custom headers.
All but "Content-Length" are included and sent. We also tried to disable chunking, but it had no effect.
Issue exist in org.apache.cxf:cxf-rt-rs-client package, both 3.3.4 and 3.3.5 versions. We are using Java 8 mainly. We also tried with Java 13 with no success.
Partial code:
Map<String, Object> headers;
...
...
...
Client client = WebClient.client(api);
if (headers != null)
headers.forEach(client::header);
We've managed to debug this and found out that all the headers are kept in the "PROTOCOL_HEADERS" map up until the actual request is made. At that point, "Content-Length" is omitted.
On a side note, body is "null" for the request. Shouldn't the "Content-Length : 0" be automatically added?
Attachments
Attachments
Issue Links
- is a clone of
-
CXF-2649 no content length in http header
- Closed