[ 
https://issues.apache.org/jira/browse/CAMEL-11048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936332#comment-15936332
 ] 

ASF GitHub Bot commented on CAMEL-11048:
----------------------------------------

GitHub user mluckam opened a pull request:

    https://github.com/apache/camel/pull/1558

    CAMEL-11048 Jetty Producer always uses "Transfer-Encoding: chunked" header

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mluckam/camel CAMEL-11048

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1558.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1558
    
----
commit 58abf94b8da0feb5eb187f94caa24d040dc32b1f
Author: Matthew Luckam <matthew.luc...@solers.com>
Date:   2016-02-19T19:43:19Z

    CAMEL-11048 Jetty Producer always uses "Transfer-Encoding: chunked" header
    
    Change-Id: Icc12a11b9b2886affb0f6b6d4a874de11c0338bd

----


> 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
>              Labels: camel-jetty
>
> 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)

Reply via email to