You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/07/07 21:34:00 UTC
svn commit: r1143992 - in /camel/branches/camel-2.7.x: ./
components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
Author: dkulp
Date: Thu Jul 7 19:34:00 2011
New Revision: 1143992
URL: http://svn.apache.org/viewvc?rev=1143992&view=rev
Log:
Merged revisions 1083723-1083724 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1083723 | ningjiang | 2011-03-21 06:12:19 -0400 (Mon, 21 Mar 2011) | 1 line
CAMEL-3788 HTTP Producer should not return a out message with null when the timeout exception is thrown.
........
r1083724 | ningjiang | 2011-03-21 06:13:00 -0400 (Mon, 21 Mar 2011) | 1 line
CAMEL-3788 Merged the patch into camel-http4
........
Modified:
camel/branches/camel-2.7.x/ (props changed)
camel/branches/camel-2.7.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
camel/branches/camel-2.7.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
Propchange: camel/branches/camel-2.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 7 19:34:00 2011
@@ -1 +1 @@
-/camel/trunk:1083696,1084150,1085905,1086231,1087276,1087612,1087856,1088583,1088916-1088917,1089275,1090166,1090960-1090969,1091518,1091771,1091799,1092068,1092577,1092667,1093978,1094156,1095405,1095469,1095471,1095475-1095476,1097909,1097912,1097978,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925
+/camel/trunk:1083696,1083723-1083724,1084150,1085905,1086231,1087276,1087612,1087856,1088583,1088916-1088917,1089275,1090166,1090960-1090969,1091518,1091771,1091799,1092068,1092577,1092667,1093978,1094156,1095405,1095469,1095471,1095475-1095476,1097909,1097912,1097978,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925
Modified: camel/branches/camel-2.7.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java?rev=1143992&r1=1143991&r2=1143992&view=diff
==============================================================================
--- camel/branches/camel-2.7.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java (original)
+++ camel/branches/camel-2.7.x/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java Thu Jul 7 19:34:00 2011
@@ -125,11 +125,13 @@ public class HttpProducer extends Defaul
}
protected void populateResponse(Exchange exchange, HttpMethod method, Message in, HeaderFilterStrategy strategy, int responseCode) throws IOException, ClassNotFoundException {
+ //We just make the out message is not create when extractResponseBody throws exception,
+ Object response = extractResponseBody(method, exchange);
Message answer = exchange.getOut();
answer.setHeaders(in.getHeaders());
answer.setHeader(Exchange.HTTP_RESPONSE_CODE, responseCode);
- answer.setBody(extractResponseBody(method, exchange));
+ answer.setBody(response);
// propagate HTTP response headers
Header[] headers = method.getResponseHeaders();
Modified: camel/branches/camel-2.7.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java?rev=1143992&r1=1143991&r2=1143992&view=diff
==============================================================================
--- camel/branches/camel-2.7.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java (original)
+++ camel/branches/camel-2.7.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java Thu Jul 7 19:34:00 2011
@@ -127,11 +127,13 @@ public class HttpProducer extends Defaul
protected void populateResponse(Exchange exchange, HttpRequestBase httpRequest, HttpResponse httpResponse,
Message in, HeaderFilterStrategy strategy, int responseCode) throws IOException, ClassNotFoundException {
+ // We just make the out message is not create when extractResponseBody throws exception
+ Object response = extractResponseBody(httpRequest, httpResponse, exchange);
Message answer = exchange.getOut();
answer.setHeaders(in.getHeaders());
answer.setHeader(Exchange.HTTP_RESPONSE_CODE, responseCode);
- answer.setBody(extractResponseBody(httpRequest, httpResponse, exchange));
+ answer.setBody(response);
// propagate HTTP response headers
Header[] headers = httpResponse.getAllHeaders();