From 03d8918142681d4c8abe40e8c8fb32307756d8a8 Mon Sep 17 00:00:00 2001 From: tedyu Date: Thu, 19 Feb 2015 16:37:35 -0800 Subject: [PATCH] HBASE-13069 Thrift Http Server returns an error code of 500 instead of 401 when authentication fails (Srikanth Srungarapu) --- .../java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java index 25c6da3fbdb..f3bed0a8923 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java @@ -83,6 +83,7 @@ public class ThriftHttpServlet extends TServlet { // Send a 401 to the client response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); response.getWriter().println("Authentication Error: " + e.getMessage()); + return; } } String doAsUserFromQuery = request.getHeader("doAs");