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 2015/02/26 13:33:18 UTC
[2/2] camel git commit: CAMEL-8411: camel-netty-http - Checking for
host header is invalid
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/f3e87087
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f3e87087
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f3e87087
Branch: refs/heads/camel-2.14.x
Commit: f3e870875b8331a2a48b056e10f6cfa2e575ad4a
Parents: bd88fc6
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Feb 26 13:33:48 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Feb 26 13:34:18 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/f3e87087/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/f3e87087/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");