HBASE-13069 Thrift Http Server returns an error code of 500 instead of 401 when authentication fails (Srikanth Srungarapu)

This commit is contained in:
tedyu 2015-02-19 16:37:35 -08:00
parent 365054c110
commit 03d8918142
1 changed files with 1 additions and 0 deletions

View File

@ -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");