You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/11/10 15:46:48 UTC
svn commit: r712669 - in /activemq/camel/branches/camel-1.x: ./
components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Author: ningjiang
Date: Mon Nov 10 06:46:48 2008
New Revision: 712669
URL: http://svn.apache.org/viewvc?rev=712669&view=rev
Log:
Merged revisions 712148 via svnmerge from
https://svn.apache.org/repos/asf/activemq/camel/trunk
........
r712148 | ningjiang | 2008-11-07 23:07:09 +0800 (Fri, 07 Nov 2008) | 1 line
CAMEL-1018 applied patch with thanks to Balazs
........
Modified:
activemq/camel/branches/camel-1.x/ (props changed)
activemq/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 10 06:46:48 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148
Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov 10 06:46:48 2008
@@ -1 +1 @@
-/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119
+/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756,711784,711859,711874,711962,711971,712064,712119,712148
Modified: activemq/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=712669&r1=712668&r2=712669&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java (original)
+++ activemq/camel/branches/camel-1.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java Mon Nov 10 06:46:48 2008
@@ -47,6 +47,7 @@
* @version $Revision$
*/
public class HttpProducer extends DefaultProducer<HttpExchange> implements Producer<HttpExchange> {
+ public static final String HTTP_URI = "http.uri";
public static final String HTTP_RESPONSE_CODE = "http.responseCode";
public static final String QUERY = "org.apache.camel.component.http.query";
// This should be a set of lower-case strings
@@ -177,7 +178,11 @@
methodToUse = requestEntity != null ? HttpMethods.POST : HttpMethods.GET;
}
- String uri = ((HttpEndpoint)getEndpoint()).getHttpUri().toString();
+ String uri = exchange.getIn().getHeader(HTTP_URI, String.class);
+ if (uri == null) {
+ uri = ((HttpEndpoint)getEndpoint()).getHttpUri().toString();
+ }
+
HttpMethod method = methodToUse.createMethod(uri);
if (queryString != null) {