Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2A62E200CA3 for ; Wed, 17 May 2017 18:21:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 28F86160BB5; Wed, 17 May 2017 16:21:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 71829160BBA for ; Wed, 17 May 2017 18:21:08 +0200 (CEST) Received: (qmail 96357 invoked by uid 500); 17 May 2017 16:21:07 -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 96185 invoked by uid 99); 17 May 2017 16:21:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2017 16:21:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2C550C16CC for ; Wed, 17 May 2017 16:21:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.688 X-Spam-Level: X-Spam-Status: No, score=-98.688 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id EAsujHyK7LaJ for ; Wed, 17 May 2017 16:21:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C28405FC52 for ; Wed, 17 May 2017 16:21:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DBD7EE0D90 for ; Wed, 17 May 2017 16:21:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4774D263AC for ; Wed, 17 May 2017 16:21:04 +0000 (UTC) Date: Wed, 17 May 2017 16:21:04 +0000 (UTC) From: "Owain McGuire (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-11293) Rest DSL Producer HTTP ignores http verb from uri MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 17 May 2017 16:21:09 -0000 Owain McGuire created CAMEL-11293: ------------------------------------- Summary: Rest DSL Producer HTTP ignores http verb from uri Key: CAMEL-11293 URL: https://issues.apache.org/jira/browse/CAMEL-11293 Project: Camel Issue Type: Bug Components: camel-http4 Affects Versions: 2.19.0 Reporter: Owain McGuire As per http://camel.465427.n5.nabble.com/2-19-0-Rest-Producer-DSL-http4-support-for-PUT-workaround-td5799706.html https://github.com/apache/camel/blob/camel-2.19.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java#L64 The createMethod function does not take the http verb from the URI, PUT is transformed to a POST since there is a payload. Resulting in an incorrect http request being formed. The verb from the URI should take precedence. There is a workaround of setting Exchange.HTTP_METHOD header as per: .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.PUT)) .to("rest:put:api/resource/{{resource.id}}") HttpHelperTest is lacking coverage of http verbs other than GET and POST -- This message was sent by Atlassian JIRA (v6.3.15#6346)