public class FastCGIProxyServlet extends ProxyServlet.Transparent
ProxyServlet.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 parameterscriptPattern
, optional, defaults to (.+?\.php)
,
that specifies a regular expression with at least 1 and at most 2 groups that specify
respectively:
TryFilesFilter
,
Serialized FormProxyServlet.Transparent
Modifier and Type | Field and Description |
---|---|
static String |
SCRIPT_PATTERN_INIT_PARAM |
static String |
SCRIPT_ROOT_INIT_PARAM |
_log, ASYNC_CONTEXT
Constructor and Description |
---|
FastCGIProxyServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
customizeFastCGIHeaders(Request proxyRequest,
HttpFields fastCGIHeaders) |
protected void |
customizeProxyRequest(Request proxyRequest,
HttpServletRequest request)
Extension point for subclasses to customize the proxy request.
|
void |
init() |
protected HttpClient |
newHttpClient() |
rewriteURI
addViaHeader, addXForwardedHeaders, createHttpClient, createLogger, destroy, filterResponseHeader, getBlackListHosts, getRequestId, getTimeout, getViaHost, getWhiteListHosts, onResponseContent, onResponseFailure, onResponseHeaders, onResponseSuccess, onRewriteFailed, service, setTimeout, validateDestination, viaHost
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public static final String SCRIPT_ROOT_INIT_PARAM
public static final String SCRIPT_PATTERN_INIT_PARAM
public void init() throws ServletException
init
in class ProxyServlet.Transparent
ServletException
protected HttpClient newHttpClient()
newHttpClient
in class ProxyServlet
protected void customizeProxyRequest(Request proxyRequest, HttpServletRequest request)
ProxyServlet
customizeProxyRequest
in class ProxyServlet
proxyRequest
- the proxy request to customizerequest
- the request to be proxiedprotected void customizeFastCGIHeaders(Request proxyRequest, HttpFields fastCGIHeaders)
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.