You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2008/11/30 15:03:58 UTC
svn commit: r721813 - in /activemq/camel/trunk/components:
camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java
camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java
Author: davsclaus
Date: Sun Nov 30 06:03:57 2008
New Revision: 721813
URL: http://svn.apache.org/viewvc?rev=721813&view=rev
Log:
CAMEL-1119: Applied 2nd patch with thanks to Trev.
Modified:
activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java
activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java
Modified: activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java?rev=721813&r1=721812&r2=721813&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java (original)
+++ activemq/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpOperationFailedException.java Sun Nov 30 06:03:57 2008
@@ -27,20 +27,20 @@
private final String redirectLocation;
private final int statusCode;
private final StatusLine statusLine;
- private final Header[] headers;
+ private final Header[] responseHeaders;
private final InputStream responseBody;
- public HttpOperationFailedException(int statusCode, StatusLine statusLine, String location, Header[] headers, InputStream responseBody) {
+ public HttpOperationFailedException(int statusCode, StatusLine statusLine, String location, Header[] responseHeaders, InputStream responseBody) {
super("HTTP operation failed with statusCode: " + statusCode + ", status: " + statusLine + (location != null ? ", redirectLocation: " + location : ""));
this.statusCode = statusCode;
this.statusLine = statusLine;
this.redirectLocation = location;
- this.headers = headers;
+ this.responseHeaders = responseHeaders;
this.responseBody = responseBody;
}
- public HttpOperationFailedException(int statusCode, StatusLine statusLine, Header[] headers, InputStream responseBody) {
- this(statusCode, statusLine, null, headers, responseBody);
+ public HttpOperationFailedException(int statusCode, StatusLine statusLine, Header[] responseHeaders, InputStream responseBody) {
+ this(statusCode, statusLine, null, responseHeaders, responseBody);
}
public boolean isRedirectError() {
@@ -63,12 +63,12 @@
return statusCode;
}
- public Header[] getHeaders() {
- return headers;
+ public Header[] getResponseHeaders() {
+ return responseHeaders;
}
public InputStream getResponseBody() {
return responseBody;
}
-
+
}
\ No newline at end of file
Modified: activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java?rev=721813&r1=721812&r2=721813&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java (original)
+++ activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyResponseBodyWhenErrorTest.java Sun Nov 30 06:03:57 2008
@@ -38,8 +38,8 @@
String body = context.getTypeConverter().convertTo(String.class, cause.getResponseBody());
assertTrue(body.indexOf("Damm") > -1);
assertTrue(body.indexOf("IllegalArgumentException") > -1);
- assertNotNull(cause.getHeaders());
- assertTrue("Should have http header with content type set", cause.getHeaders()[0].getValue().indexOf("text/plain") > -1);
+ assertNotNull(cause.getResponseHeaders());
+ assertTrue("Should have http header with content type set", cause.getResponseHeaders()[0].getValue().indexOf("text/plain") > -1);
}
}