@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        setCurrentRequest((HttpServletRequest) request);
        try {
            chain.doFilter(request, response);
        } finally {
            clearCurrentRequest();
        }
    }
@see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
gateway/platforms/war/src/main/java/io/apiman/gateway/platforms/war/filters/HttpRequestThreadLocalFilter.java