camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [1/2] camel git commit: Camel-Undertow replaced deprecated methods
Date Mon, 01 Aug 2016 09:39:53 GMT
Repository: camel
Updated Branches:
  refs/heads/master aa4bdf651 -> c1c471af8


Camel-Undertow replaced deprecated methods


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c1c471af
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c1c471af
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c1c471af

Branch: refs/heads/master
Commit: c1c471af807f669da1658fcaa825e7606ac2a044
Parents: a16958b
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Aug 1 11:39:06 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Aug 1 11:39:28 2016 +0200

----------------------------------------------------------------------
 .../camel/component/undertow/handlers/HttpCamelHandler.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c1c471af/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/HttpCamelHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/HttpCamelHandler.java
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/HttpCamelHandler.java
index 352dd26..d9778c5 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/HttpCamelHandler.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/HttpCamelHandler.java
@@ -67,7 +67,7 @@ public class HttpCamelHandler implements HttpHandler {
                 allowedMethods = "GET,HEAD,POST,PUT,DELETE,TRACE,OPTIONS,CONNECT,PATCH";
             }
             //return list of allowed methods in response headers
-            httpExchange.setResponseCode(StatusCodes.OK);
+            httpExchange.setStatusCode(StatusCodes.OK);
             httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_TYPE, MimeMappings.DEFAULT_MIME_MAPPINGS.get("txt"));
             httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_LENGTH, 0);
             httpExchange.getResponseHeaders().put(Headers.ALLOW, allowedMethods);
@@ -78,7 +78,7 @@ public class HttpCamelHandler implements HttpHandler {
         //reject if the method is not allowed
         if (consumer.getEndpoint().getHttpMethodRestrict() != null
             && !consumer.getEndpoint().getHttpMethodRestrict().contains(requestMethod.toString()))
{
-            httpExchange.setResponseCode(StatusCodes.METHOD_NOT_ALLOWED);
+            httpExchange.setStatusCode(StatusCodes.METHOD_NOT_ALLOWED);
             httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_TYPE, MimeMappings.DEFAULT_MIME_MAPPINGS.get("txt"));
             httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_LENGTH, 0);
             httpExchange.getResponseSender().close();


Mime
View raw message