You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/03/04 15:09:40 UTC

[jira] [Updated] (CAMEL-9664) DefaultRestletBinding.populateRestletRequestFromExchange uses wrong mediaType comparison

     [ https://issues.apache.org/jira/browse/CAMEL-9664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-9664:
-------------------------------
    Fix Version/s: 2.17.0
                   2.16.3

> DefaultRestletBinding.populateRestletRequestFromExchange uses wrong mediaType comparison
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9664
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9664
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.16.2
>            Reporter: Wouter Blancquaert
>             Fix For: 2.16.3, 2.17.0
>
>
> We are trying to bind an incoming POST REST call with Content-Type application/x-www-form-urlencoded to an outgoing one. The incoming request body containing the url encoded form does not get transferred to the outgoing one. We investigated and saw there's a bug in 
> DefaultRestletBinding.populateRestletRequestFromExchange:180 (2.16.2):
> if (request.getMethod() == Method.GET || (request.getMethod() == Method.POST && mediaType == MediaType.APPLICATION_WWW_FORM)) {
> The mediaType gets compared using ==. This is wrong. The condition always evaluates to false although the configured Content-Type within the header is "application/x-www-form-urlencoded" (or in our case "application/x-www-form-urlencoded; charset=ISO-8859-1").



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