You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/08/05 08:57:03 UTC

Re: StreamCaching with slip not working

This is a bug in Camel and has been fixed recently. So will be fixed
in upcoming releases.

On Mon, Jul 22, 2013 at 8:44 PM, ramrubio <ra...@yahoo.com> wrote:
> Stepping through code noticed that InputStreamRequestEntity is used during
> post request.
>
> A call to InputStreamRequestEntity.getContentLength leads to a call to
> bufferContent because contentLength is set to CONTENT_LENGTH_AUTO.  The type
> of inputStream that is set in InputStreamRequestEntity is of type
> InputStreamCache.
>
> Because position is set to the end of the inputstream (see below) the call
> to bufferContent results in buffer set to empty and the size is updated to
> 0.  This causes POST request to always have an empty body.
>
> this    InputStreamRequestEntity  (id=169)
>         buffer  null
>         content InputStreamCache  (id=146)
>                 buf      (id=154)
>                 count   10
>                 mark    0
>                 pos     10
>         contentLength   -2
>         contentType     "application/json" (id=172)
>
> Is this expected?
>
> /Ramon
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/StreamCaching-with-slip-not-working-tp5736044p5736047.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen