[
https://issues.apache.org/jira/browse/CXF-8214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Topić updated CXF-8214:
----------------------------
Priority: Blocker (was: Major)
> CLONE - no content length in http header
> ----------------------------------------
>
> Key: CXF-8214
> URL: https://issues.apache.org/jira/browse/CXF-8214
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Environment: Apache Camel
> Reporter: Ivan Topić
> Priority: Blocker
> Fix For: Invalid
>
>
> 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?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)