code: public static void dumpHeaders(final HttpServletRequest req) {
      Enumeration en = req.getHeaderNames();
      while (en.hasMoreElements()) {
        String name = (String) en.nextElement();
        logger.debug(name + ": " + req.getHeader(name));
      }
    }
docs: Print all the headers
  
  @param   req    Incoming HttpServletRequest object