Class PentahoPathDecodingFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class PentahoPathDecodingFilter
    extends Object
    implements javax.servlet.Filter
    This filter is designed to work around a limitation of some web servers which prohibit the encoded form of / and \ (%2F and %5C) being in the URL. Clients can pass double-encoded forms of these encodings instead (%252F and %255C). This filter will detect any occurance of these double encodings and correct them before passing on to the rest of the servlet chain.

    Created by nbaker on 4/8/14.

    • Constructor Detail

      • PentahoPathDecodingFilter

        public PentahoPathDecodingFilter()
    • Method Detail

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Filter
        Throws:
        javax.servlet.ServletException
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest servletRequest,
                             javax.servlet.ServletResponse servletResponse,
                             javax.servlet.FilterChain filterChain)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Throws:
        IOException
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Filter