public static String getDoasFromHeader(final HttpServletRequest request) {
    String doas = null;
    final Enumeration<String> headers = request.getHeaderNames();
    while (headers.hasMoreElements()) {
      String header = headers.nextElement();
      if (header.toLowerCase().equals("doas")) {
        doas = request.getHeader(header);
        break;
      }
    }
    return doas;
  }
The purpose of this function is to get the doAs parameter of a http request case insensitively
@return doAs parameter if exists or null otherwise
hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProxyUserAuthenticationFilter.java