It's generally safe to cast ServletRequest to HttpServletRequest.
Background: When the Servlet API was created it was originally HTTP agnostic, with the intention of allowing extensions to all sorts of servers (e.g. mail, FTP, etc). In reality this never happened but there are still crufty parts of the API where you have to cast (i.e. the Filter API).