public abstract class AbstractHttp11Protocol<S> extends AbstractProtocol<S>
AbstractProtocol.ConnectionHandler<S>, AbstractProtocol.RecycledProcessors| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm |
adapter, domain, mserver, oname, processorCache, rgOname| Constructor and Description |
|---|
AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllowedTrailerHeader(String header) |
void |
addSslHostConfig(SSLHostConfig sslHostConfig)
Add a new SSL configuration for a virtual host.
|
void |
addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
Add a new protocol for used by HTTP/1.1 upgrade or ALPN.
|
protected Processor |
createProcessor()
Create and configure a new Processor instance for the current protocol
implementation.
|
protected Processor |
createUpgradeProcessor(SocketWrapperBase<?> socket,
UpgradeToken upgradeToken) |
SSLHostConfig[] |
findSslHostConfigs()
Find all configured SSL virtual host configurations which will be used
by SNI.
|
UpgradeProtocol[] |
findUpgradeProtocols()
Return all configured upgrade protocols.
|
String |
getAllowedTrailerHeaders() |
protected Set<String> |
getAllowedTrailerHeadersInternal() |
boolean |
getAllowHostHeaderMismatch()
Will Tomcat accept an HTTP 1.1 request where the host header does not
agree with the host specified (if any) in the request line?
|
String |
getCompressibleMimeType() |
String[] |
getCompressibleMimeTypes() |
String |
getCompression() |
protected int |
getCompressionLevel() |
int |
getCompressionMinSize() |
int |
getConnectionUploadTimeout()
Specifies a different (usually longer) connection timeout during data
upload.
|
String |
getContinueResponseTiming() |
ContinueResponseTiming |
getContinueResponseTimingInternal() |
String |
getDefaultSSLHostConfigName() |
boolean |
getDisableUploadTimeout()
Get the flag that controls upload time-outs.
|
protected AbstractEndpoint<S,?> |
getEndpoint()
Over-ridden here to make the method visible to nested classes.
|
int |
getMaxExtensionSize() |
int |
getMaxHttpHeaderSize() |
int |
getMaxKeepAliveRequests() |
int |
getMaxSavePostSize()
Return the maximum size of the post which will be saved during FORM or
CLIENT-CERT authentication.
|
int |
getMaxSwallowSize() |
int |
getMaxTrailerSize() |
UpgradeProtocol |
getNegotiatedProtocol(String negotiatedName)
Find a suitable handler for the protocol negotiated
at the network layer.
|
String |
getNoCompressionUserAgents() |
protected Pattern |
getNoCompressionUserAgentsPattern() |
protected String |
getProtocolName()
Obtain the name of the protocol, (Http, Ajp, etc.).
|
boolean |
getRejectIllegalHeader()
If an HTTP request is received that contains an illegal header name or
value (e.g. the header name is not a token) will the request be rejected
(with a 400 response) or will the illegal header be ignored?
|
String |
getRelaxedPathChars() |
String |
getRelaxedQueryChars() |
String |
getRestrictedUserAgents()
Get the string form of the regular expression that defines the User
agents which should be restricted to HTTP/1.0 support.
|
protected Pattern |
getRestrictedUserAgentsPattern() |
boolean |
getSecure() |
String |
getServer() |
boolean |
getServerRemoveAppProvidedValues()
Should application provider values for the HTTP Server header be removed.
|
UpgradeProtocol |
getUpgradeProtocol(String upgradedName)
Find a suitable handler for the protocol upgraded name specified.
|
boolean |
getUseKeepAliveResponseHeader() |
boolean |
getUseSendfile() |
void |
init()
Initialise the protocol.
|
boolean |
isSSLEnabled() |
boolean |
isTrailerHeaderAllowed(String headerName) |
void |
reloadSslHostConfig(String hostName) |
void |
reloadSslHostConfigs() |
void |
removeAllowedTrailerHeader(String header) |
void |
setAllowedTrailerHeaders(String commaSeparatedHeaders) |
void |
setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)
Will Tomcat accept an HTTP 1.1 request where the host header does not
agree with the host specified (if any) in the request line?
|
void |
setCompressibleMimeType(String valueS) |
void |
setCompression(String compression) |
void |
setCompressionMinSize(int compressionMinSize) |
void |
setConnectionUploadTimeout(int timeout)
Set the upload timeout.
|
void |
setContinueResponseTiming(String continueResponseTiming) |
void |
setDefaultSSLHostConfigName(String defaultSSLHostConfigName) |
void |
setDisableUploadTimeout(boolean isDisabled)
Set the flag to control whether a separate connection timeout is used
during upload of a request body.
|
void |
setMaxExtensionSize(int maxExtensionSize) |
void |
setMaxHttpHeaderSize(int valueI) |
void |
setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests to allow.
|
void |
setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be buffered during FORM or
CLIENT-CERT authentication.
|
void |
setMaxSwallowSize(int maxSwallowSize) |
void |
setMaxTrailerSize(int maxTrailerSize) |
void |
setNoCompressionUserAgents(String noCompressionUserAgents) |
void |
setRejectIllegalHeader(boolean rejectIllegalHeader)
If an HTTP request is received that contains an illegal header name or
value (e.g. the header name is not a token) should the request be
rejected (with a 400 response) or should the illegal header be ignored?
|
void |
setRelaxedPathChars(String relaxedPathChars) |
void |
setRelaxedQueryChars(String relaxedQueryChars) |
void |
setRestrictedUserAgents(String restrictedUserAgents)
Set restricted user agent list (which will downgrade the connector
to HTTP/1.0 mode).
|
void |
setSecure(boolean b) |
void |
setServer(String server)
Set the server header name.
|
void |
setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues) |
void |
setSSLEnabled(boolean SSLEnabled) |
void |
setUseKeepAliveResponseHeader(boolean useKeepAliveResponseHeader) |
void |
setUseSendfile(boolean useSendfile) |
boolean |
useCompression(Request request,
Response response) |
addWaitingProcessor, closeServerSocketGraceful, destroy, getAcceptCount, getAcceptorThreadPriority, getAdapter, getAddress, getClientCertProvider, getConnectionCount, getConnectionLinger, getConnectionTimeout, getDomain, getExecutor, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getPortOffset, getPortWithOffset, getProcessorCache, getProperty, getTcpNoDelay, getThreadPriority, getUtilityExecutor, isAprRequired, isPaused, isSendfileSupported, pause, postDeregister, postRegister, preDeregister, preRegister, removeWaitingProcessor, resume, setAcceptCount, setAcceptorThreadPriority, setAdapter, setAddress, setClientCertProvider, setConnectionLinger, setConnectionTimeout, setExecutor, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxThreads, setMinSpareThreads, setPort, setPortOffset, setProcessorCache, setProperty, setTcpNoDelay, setThreadPriority, setUtilityExecutor, start, startAsyncTimeout, stop, stopAsyncTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, getDesiredBufferSizeprotected static final StringManager sm
public AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint)
public void init()
throws Exception
ProtocolHandlerinit in interface ProtocolHandlerinit in class AbstractProtocol<S>Exception - If the protocol handler fails to initialiseprotected String getProtocolName()
AbstractProtocolgetProtocolName in class AbstractProtocol<S>protected AbstractEndpoint<S,?> getEndpoint()
Over-ridden here to make the method visible to nested classes.
getEndpoint in class AbstractProtocol<S>public String getContinueResponseTiming()
public void setContinueResponseTiming(String continueResponseTiming)
public ContinueResponseTiming getContinueResponseTimingInternal()
public boolean getUseKeepAliveResponseHeader()
public void setUseKeepAliveResponseHeader(boolean useKeepAliveResponseHeader)
public String getRelaxedPathChars()
public void setRelaxedPathChars(String relaxedPathChars)
public String getRelaxedQueryChars()
public void setRelaxedQueryChars(String relaxedQueryChars)
public boolean getAllowHostHeaderMismatch()
true if Tomcat will allow such requests, otherwise
falsepublic void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)
allowHostHeaderMismatch - true to allow such requests,
false to reject them with a 400public boolean getRejectIllegalHeader()
true if the request will be rejected or false if
the header will be ignoredpublic void setRejectIllegalHeader(boolean rejectIllegalHeader)
rejectIllegalHeader - true to reject requests with illegal
header names or values, false to
ignore the headerpublic int getMaxSavePostSize()
public void setMaxSavePostSize(int maxSavePostSize)
maxSavePostSize - The maximum size POST body to buffer in bytespublic int getMaxHttpHeaderSize()
public void setMaxHttpHeaderSize(int valueI)
public int getConnectionUploadTimeout()
public void setConnectionUploadTimeout(int timeout)
timeout - Upload timeout in millisecondspublic boolean getDisableUploadTimeout()
true if the separate upload timeout is disabledpublic void setDisableUploadTimeout(boolean isDisabled)
isDisabled - true if the separate upload timeout should be
disabledpublic void setCompression(String compression)
public String getCompression()
protected int getCompressionLevel()
public String getNoCompressionUserAgents()
protected Pattern getNoCompressionUserAgentsPattern()
public void setNoCompressionUserAgents(String noCompressionUserAgents)
public String getCompressibleMimeType()
public void setCompressibleMimeType(String valueS)
public String[] getCompressibleMimeTypes()
public int getCompressionMinSize()
public void setCompressionMinSize(int compressionMinSize)
public String getRestrictedUserAgents()
protected Pattern getRestrictedUserAgentsPattern()
public void setRestrictedUserAgents(String restrictedUserAgents)
Pattern.restrictedUserAgents - The regular expression as supported by
Pattern for the user agents e.g.
"gorilla|desesplorer|tigrus"public String getServer()
public void setServer(String server)
server - The new value to use for the server headerpublic boolean getServerRemoveAppProvidedValues()
server is set, any application provided value will
be over-ridden.true if application provided values should be removed,
otherwise falsepublic void setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues)
public int getMaxTrailerSize()
public void setMaxTrailerSize(int maxTrailerSize)
public int getMaxExtensionSize()
public void setMaxExtensionSize(int maxExtensionSize)
public int getMaxSwallowSize()
public void setMaxSwallowSize(int maxSwallowSize)
public boolean getSecure()
public void setSecure(boolean b)
public void setAllowedTrailerHeaders(String commaSeparatedHeaders)
public boolean isTrailerHeaderAllowed(String headerName)
public String getAllowedTrailerHeaders()
public void addAllowedTrailerHeader(String header)
public void removeAllowedTrailerHeader(String header)
public void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
ProtocolHandlerupgradeProtocol - the protocolpublic UpgradeProtocol[] findUpgradeProtocols()
ProtocolHandlerpublic UpgradeProtocol getNegotiatedProtocol(String negotiatedName)
AbstractProtocolgetNegotiatedProtocol in class AbstractProtocol<S>negotiatedName - The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName() matches
the requested protocolpublic UpgradeProtocol getUpgradeProtocol(String upgradedName)
AbstractProtocolgetUpgradeProtocol in class AbstractProtocol<S>upgradedName - The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName() matches
the requested protocolpublic boolean isSSLEnabled()
public void setSSLEnabled(boolean SSLEnabled)
public boolean getUseSendfile()
public void setUseSendfile(boolean useSendfile)
public int getMaxKeepAliveRequests()
public void setMaxKeepAliveRequests(int mkar)
mkar - The new maximum number of Keep-Alive requests allowedpublic String getDefaultSSLHostConfigName()
public void setDefaultSSLHostConfigName(String defaultSSLHostConfigName)
public void addSslHostConfig(SSLHostConfig sslHostConfig)
ProtocolHandlersslHostConfig - the configurationpublic SSLHostConfig[] findSslHostConfigs()
ProtocolHandlerpublic void reloadSslHostConfigs()
public void reloadSslHostConfig(String hostName)
protected Processor createProcessor()
AbstractProtocolcreateProcessor in class AbstractProtocol<S>protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
createUpgradeProcessor in class AbstractProtocol<S>Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.