Fixed some method calls so that they also work with the Servlet 2.5 API
HttpServletRequest.getHeaderNames() and getHeader() may return null