Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9C32185C4 for ; Wed, 2 Mar 2016 15:05:18 +0000 (UTC) Received: (qmail 30113 invoked by uid 500); 2 Mar 2016 15:05:18 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 29982 invoked by uid 500); 2 Mar 2016 15:05:18 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 29958 invoked by uid 99); 2 Mar 2016 15:05:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 15:05:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4C2422C1F6E for ; Wed, 2 Mar 2016 15:05:18 +0000 (UTC) Date: Wed, 2 Mar 2016 15:05:18 +0000 (UTC) From: "Wouter Blancquaert (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-9664) DefaultRestletBinding.populateRestletRequestFromExchange uses wrong mediaType comparison MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Wouter Blancquaert created CAMEL-9664: ----------------------------------------- Summary: 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 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)