[
https://issues.apache.org/jira/browse/CAMEL-9664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-9664.
--------------------------------
Resolution: Fixed
> 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
> Assignee: Claus Ibsen
> 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)