You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Richard Peter (JIRA)" <ji...@apache.org> on 2015/03/19 21:28:38 UTC

[jira] [Commented] (CAMEL-5806) DefaultHttpBinding shouldn't assume null payload if HttpMethod == GET

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

Richard Peter commented on CAMEL-5806:
--------------------------------------

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)