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:36:00 -08:00
parent 49ae4ab672
commit 0a21b1e226
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");