Class FastCGIProxyServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class FastCGIProxyServlet
    extends AsyncProxyServlet.Transparent
    Specific implementation of AsyncProxyServlet.Transparent for FastCGI.

    This servlet accepts a HTTP request and transforms it into a FastCGI request that is sent to the FastCGI server specified in the proxyTo init-param.

    This servlet accepts two additional init-params:

    • scriptRoot, mandatory, that must be set to the directory where the application that must be served via FastCGI is installed and corresponds to the FastCGI DOCUMENT_ROOT parameter
    • scriptPattern, optional, defaults to (.+?\.php), that specifies a regular expression with at least 1 and at most 2 groups that specify respectively:
      • the FastCGI SCRIPT_NAME parameter
      • the FastCGI PATH_INFO parameter
    • fastCGI.HTTPS, optional, defaults to false, that specifies whether to force the FastCGI HTTPS parameter to the value on
    See Also:
    TryFilesFilter, Serialized Form
    • Field Detail

      • SCRIPT_ROOT_INIT_PARAM

        public static final java.lang.String SCRIPT_ROOT_INIT_PARAM
        See Also:
        Constant Field Values
      • SCRIPT_PATTERN_INIT_PARAM

        public static final java.lang.String SCRIPT_PATTERN_INIT_PARAM
        See Also:
        Constant Field Values
      • ORIGINAL_URI_ATTRIBUTE_INIT_PARAM

        public static final java.lang.String ORIGINAL_URI_ATTRIBUTE_INIT_PARAM
        See Also:
        Constant Field Values
      • ORIGINAL_QUERY_ATTRIBUTE_INIT_PARAM

        public static final java.lang.String ORIGINAL_QUERY_ATTRIBUTE_INIT_PARAM
        See Also:
        Constant Field Values
      • FASTCGI_HTTPS_INIT_PARAM

        public static final java.lang.String FASTCGI_HTTPS_INIT_PARAM
        See Also:
        Constant Field Values
    • Constructor Detail

      • FastCGIProxyServlet

        public FastCGIProxyServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Overrides:
        init in class AbstractProxyServlet
        Throws:
        javax.servlet.ServletException
      • sendProxyRequest

        protected void sendProxyRequest​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse proxyResponse,
                                        Request proxyRequest)
        Overrides:
        sendProxyRequest in class AbstractProxyServlet
      • customizeFastCGIHeaders

        protected void customizeFastCGIHeaders​(Request proxyRequest,
                                               HttpFields fastCGIHeaders)