hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject hadoop git commit: HDFS-7406. SimpleHttpProxyHandler puts incorrect "Connection: Close" header. Contributed by Haohui Mai.
Date Tue, 18 Nov 2014 22:54:49 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 22e99e983 -> 6a32f77de


HDFS-7406. SimpleHttpProxyHandler puts incorrect "Connection: Close" header. Contributed by
Haohui Mai.


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

Branch: refs/heads/branch-2
Commit: 6a32f77de8efdbb87e5fa7bd67aafa338404f05e
Parents: 22e99e9
Author: Haohui Mai <wheat9@apache.org>
Authored: Tue Nov 18 14:52:59 2014 -0800
Committer: Haohui Mai <wheat9@apache.org>
Committed: Tue Nov 18 14:53:19 2014 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                     | 3 +++
 .../hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a32f77d/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 241d11f..3cb51ee 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -192,6 +192,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7146. NFS ID/Group lookup requires SSSD enumeration on the server
     (Yongjun Zhang via brandonli)
 
+    HDFS-7406. SimpleHttpProxyHandler puts incorrect "Connection: Close"
+    header. (wheat9)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a32f77d/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java
index 9e02b4b..ffa7681 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/SimpleHttpProxyHandler.java
@@ -39,6 +39,7 @@ import org.apache.commons.logging.Log;
 import java.net.InetSocketAddress;
 
 import static io.netty.handler.codec.http.HttpHeaders.Names.CONNECTION;
+import static io.netty.handler.codec.http.HttpHeaders.Values;
 import static io.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR;
 import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
 
@@ -119,12 +120,12 @@ class SimpleHttpProxyHandler extends SimpleChannelInboundHandler<HttpRequest>
{
           HttpRequest newReq = new DefaultFullHttpRequest(HTTP_1_1,
             req.getMethod(), req.getUri());
           newReq.headers().add(req.headers());
-          newReq.headers().set(CONNECTION, CLOSE);
+          newReq.headers().set(CONNECTION, Values.CLOSE);
           future.channel().writeAndFlush(newReq);
         } else {
           DefaultHttpResponse resp = new DefaultHttpResponse(HTTP_1_1,
             INTERNAL_SERVER_ERROR);
-          resp.headers().set(CONNECTION, CLOSE);
+          resp.headers().set(CONNECTION, Values.CLOSE);
           LOG.info("Proxy " + uri + " failed. Cause: ", future.cause());
           ctx.writeAndFlush(resp).addListener(ChannelFutureListener.CLOSE);
           client.close();


Mime
View raw message