You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Müller (JIRA)" <ji...@apache.org> on 2013/05/27 23:18:20 UTC

[jira] [Commented] (CAMEL-6402) HTTP4 - Set the content length for requests, if known

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

Christian Müller commented on CAMEL-6402:
-----------------------------------------

I polished the patch a bit to make sure we only use {{stream.available()}} if the stream is a {{ByteArrayInputStream}}. Otherwise we cannot be sure the returned length is the total/right length.
                
> HTTP4 - Set the content length for requests, if known
> -----------------------------------------------------
>
>                 Key: CAMEL-6402
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6402
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-http
>    Affects Versions: 2.10.4, 2.11.0
>            Reporter: Chris Geer
>            Assignee: Christian Müller
>             Fix For: 2.10.5, 2.11.1, 2.12.0
>
>         Attachments: CAMEL-6402.patch
>
>
> In the http4 component the content length for requests is always being set to -1 which forces it to used a chunked transfer encoding. By setting the content length (when it's known) chunked mode isn't required.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira