You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2017/03/23 09:20:42 UTC
[jira] [Updated] (CAMEL-11048) Jetty Producer always uses
"Transfer-Encoding: chunked" header
[ https://issues.apache.org/jira/browse/CAMEL-11048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino updated CAMEL-11048:
-------------------------------------
Fix Version/s: 2.19.0
2.18.4
2.17.7
> Jetty Producer always uses "Transfer-Encoding: chunked" header
> --------------------------------------------------------------
>
> Key: CAMEL-11048
> URL: https://issues.apache.org/jira/browse/CAMEL-11048
> Project: Camel
> Issue Type: Bug
> Components: camel-jetty
> Affects Versions: 2.17.6, 2.18.3
> Reporter: Matthew Luckam
> Assignee: Andrea Cosentino
> Labels: camel-jetty
> Fix For: 2.17.7, 2.18.4, 2.19.0
>
>
> The JettyHttpProducer is always sending requests with the header "Transfer-Encoding: chunked" even if the request received by the producer contains a Content-Length header. This is due to the JettyHttpProducer setting the request content as an InputStreamContentProvider which is hardcoded to always return -1 as its length. With the content set as an InputStreamContentProvider, when the content.getLength() is called in org.eclipse.jetty.client.HttpConnection ln 120, it is returned as -1. This causes the "Transfer-Encoding: chunked" header to be added at ln 129. Again in the org.eclipse.jetty.http.HttpGenerator class getLength() is called on the InputStreamContentProvider and since it is -1, the Content-Length header is not added to the request to be sent out.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)