camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-8411: camel-netty-http - Checking for host header is invalid
Date Thu, 26 Feb 2015 12:33:17 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x bd88fc655 -> f3e870875
  refs/heads/master b12fa5149 -> f3374c08c


CAMEL-8411: camel-netty-http - Checking for host header is invalid


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

Branch: refs/heads/master
Commit: f3374c08c60df442002c4a5f24e3f74381b8dcc5
Parents: b12fa51
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Feb 26 13:33:48 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Feb 26 13:33:48 2015 +0100

----------------------------------------------------------------------
 .../component/netty/http/handlers/HttpServerChannelHandler.java    | 2 +-
 .../component/netty4/http/handlers/HttpServerChannelHandler.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f3374c08/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
index 207bf57..8f483c5 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
@@ -134,7 +134,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
             return;
         }
         // must include HOST header as required by HTTP 1.1
-        if (!request.headers().names().contains(HttpHeaders.Names.HOST)) {
+        if (!request.headers().contains(HttpHeaders.Names.HOST)) {
             HttpResponse response = new DefaultHttpResponse(HTTP_1_1, BAD_REQUEST);
             response.setChunked(false);
             response.headers().set(Exchange.CONTENT_TYPE, "text/plain");

http://git-wip-us.apache.org/repos/asf/camel/blob/f3374c08/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
index cdbc999..b459057 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
@@ -124,7 +124,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
             return;
         }
         // must include HOST header as required by HTTP 1.1
-        if (!request.headers().names().contains(HttpHeaders.Names.HOST)) {
+        if (!request.headers().contains(HttpHeaders.Names.HOST)) {
             HttpResponse response = new DefaultHttpResponse(HTTP_1_1, BAD_REQUEST);
             //response.setChunked(false);
             response.headers().set(Exchange.CONTENT_TYPE, "text/plain");


Mime
View raw message