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

Richard Peter edited comment on CAMEL-5806 at 4/15/15 2:51 PM:
---------------------------------------------------------------

This change broke us when we attempted to upgrade to 2.15.0.  Our clients 
stream in binary data and the InputStream initially shows no data as being 
available so now our posts never parse.  InputStream.available is not a safe 
check for testing if no data will be available.


was (Author: richard.peter):
This change broke us when we attempted to upgrade to 2.15.0.  Our clients 
stream in binary data and the InputStream initially shows no data as being 
available so now our posts never parse.  InputStream.isAvailable is not a safe 
check for testing if no data will be available.

> DefaultHttpBinding shouldn't assume null payload if HttpMethod == GET
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-5806
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5806
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-http, camel-http4, camel-jetty
>            Reporter: Raúl Kripalani
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.15.0
>
>
> Jetty Consumer: DefaultHttpBinding#parseBody inserts a null body into the 
> message if the incoming request is for HTTP Method GET.
> If I'm not mistaken, according to the HTTP spec the payload is only null if 
> the Content-Length header is 0 or if it doesn't exist. Hence, we have a 
> shortcoming in the Camel HTTP components.
> Even though it's unusual, there are reasons why a client could send payload 
> with a GET request. Take a look at the [search 
> operation|http://www.elasticsearch.org/guide/reference/api/search/] in the 
> Elastic Search API, as an example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to