Class FastCGIProxyServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.ProxyServlet
org.eclipse.jetty.ee10.proxy.AsyncProxyServlet
org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.Transparent
org.eclipse.jetty.ee10.fcgi.proxy.FastCGIProxyServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class FastCGIProxyServlet
extends org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.Transparent
Specific implementation of
AsyncProxyServlet.Transparent for FastCGI.
This servlet accepts an 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 these 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 parameterscriptPattern, 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 FastCGIHTTPSparameter to the valueonfastCGI.envNames, optional, a comma separated list of environment variable names read viaSystem.getenv(String)that are forwarded as FastCGI parameters.unixDomainPath, optional, that specifies the Unix-Domain path the FastCGI server listens to.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.AsyncProxyServlet
org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.StreamReader, org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.StreamWriter, org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.TransparentNested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.ProxyServlet
org.eclipse.jetty.ee10.proxy.ProxyServlet.ProxyInputStreamRequestContent, org.eclipse.jetty.ee10.proxy.ProxyServlet.ProxyResponseListenerNested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet.TransparentDelegate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
_log, CLIENT_REQUEST_ATTRIBUTE, HOP_HEADERSFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomizeFastCGIHeaders(org.eclipse.jetty.client.Request proxyRequest, org.eclipse.jetty.http.HttpFields.Mutable fastCGIHeaders) voidinit()protected org.eclipse.jetty.client.HttpClientprotected voidsendProxyRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse proxyResponse, org.eclipse.jetty.client.Request proxyRequest) Methods inherited from class org.eclipse.jetty.ee10.proxy.AsyncProxyServlet.Transparent
init, rewriteTargetMethods inherited from class org.eclipse.jetty.ee10.proxy.AsyncProxyServlet
newReadListener, newWriteListener, onResponseContent, proxyRequestContentMethods inherited from class org.eclipse.jetty.ee10.proxy.ProxyServlet
newProxyResponseListener, onContinue, serviceMethods inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
addProxyHeaders, addViaHeader, addViaHeader, addXForwardedHeaders, clientRequestStatus, copyRequestHeaders, createHttpClient, createLogger, destroy, expects100Continue, filterServerResponseHeader, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, newClientConnector, newHttpClient, newProxyRequest, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, proxyResponseStatus, sendProxyResponseError, setTimeout, validateDestinationMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Field Details
-
SCRIPT_ROOT_INIT_PARAM
- See Also:
-
SCRIPT_PATTERN_INIT_PARAM
- See Also:
-
ORIGINAL_URI_ATTRIBUTE_INIT_PARAM
- See Also:
-
ORIGINAL_QUERY_ATTRIBUTE_INIT_PARAM
- See Also:
-
FASTCGI_HTTPS_INIT_PARAM
- See Also:
-
FASTCGI_ENV_NAMES_INIT_PARAM
- See Also:
-
-
Constructor Details
-
FastCGIProxyServlet
public FastCGIProxyServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classorg.eclipse.jetty.ee10.proxy.AbstractProxyServlet- Throws:
jakarta.servlet.ServletException
-
newHttpClient
protected org.eclipse.jetty.client.HttpClient newHttpClient()- Overrides:
newHttpClientin classorg.eclipse.jetty.ee10.proxy.AbstractProxyServlet
-
sendProxyRequest
protected void sendProxyRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse proxyResponse, org.eclipse.jetty.client.Request proxyRequest) - Overrides:
sendProxyRequestin classorg.eclipse.jetty.ee10.proxy.AbstractProxyServlet
-
customizeFastCGIHeaders
protected void customizeFastCGIHeaders(org.eclipse.jetty.client.Request proxyRequest, org.eclipse.jetty.http.HttpFields.Mutable fastCGIHeaders)
-