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) |
void |
destroy()
Destroy the protocol (optional).
|
SSLHostConfig[] |
findSslHostConfigs()
Find all configured SSL virtual host configurations which will be used
by SNI.
|
UpgradeProtocol[] |
findUpgradeProtocols()
Return all configured upgrade protocols.
|
String |
getAlgorithm() |
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 |
getCiphers() |
String |
getClientAuth() |
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 |
getCrlFile() |
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.
|
String |
getKeyAlias() |
String |
getKeyPass() |
String |
getKeystoreFile() |
String |
getKeystorePass() |
String |
getKeystoreProvider() |
String |
getKeystoreType() |
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.
|
boolean |
getNoCompressionStrongETag()
Deprecated.
|
String |
getNoCompressionUserAgents() |
protected Pattern |
getNoCompressionUserAgentsPattern() |
ObjectName |
getONameForUpgrade(String upgradeProtocol) |
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?
|
boolean |
getRejectIllegalHeaderName()
Deprecated.
Now an alias for
getRejectIllegalHeader(). Will be
removed in Tomcat 10 onwards. |
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.
|
int |
getSessionCacheSize() |
int |
getSessionTimeout() |
String |
getSSLCACertificateFile() |
String |
getSSLCACertificatePath() |
String |
getSSLCARevocationFile() |
String |
getSSLCARevocationPath() |
String |
getSSLCertificateChainFile() |
String |
getSSLCertificateFile() |
String |
getSSLCertificateKeyFile() |
String |
getSSLCipherSuite() |
boolean |
getSSLDisableCompression() |
boolean |
getSSLDisableSessionTickets() |
String |
getSslEnabledProtocols() |
boolean |
getSSLHonorCipherOrder() |
String |
getSSLPassword() |
String |
getSslProtocol() |
String |
getSSLProtocol() |
String |
getSSLVerifyClient() |
int |
getSSLVerifyDepth() |
String |
getTrustManagerClassName() |
int |
getTrustMaxCertLength() |
String |
getTruststoreAlgorithm() |
String |
getTruststoreFile() |
String |
getTruststorePass() |
String |
getTruststoreProvider() |
String |
getTruststoreType() |
UpgradeGroupInfo |
getUpgradeGroupInfo(String upgradeProtocol) |
UpgradeProtocol |
getUpgradeProtocol(String upgradedName)
Find a suitable handler for the protocol upgraded name specified.
|
boolean |
getUseKeepAliveResponseHeader() |
boolean |
getUseSendfile() |
boolean |
getUseServerCipherSuitesOrder() |
void |
init()
Initialise the protocol.
|
boolean |
isSSLEnabled() |
void |
reloadSslHostConfig(String hostName) |
void |
reloadSslHostConfigs() |
void |
removeAllowedTrailerHeader(String header) |
void |
setAlgorithm(String keyManagerAlgorithm) |
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 |
setCiphers(String ciphers) |
void |
setClientAuth(String certificateVerification) |
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 |
setCrlFile(String certificateRevocationListFile) |
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 |
setKeyAlias(String certificateKeyAlias) |
void |
setKeyPass(String certificateKeyPassword) |
void |
setKeystoreFile(String keystoreFile) |
void |
setKeystorePass(String certificateKeystorePassword) |
void |
setKeystoreProvider(String certificateKeystoreProvider) |
void |
setKeystoreType(String certificateKeystoreType) |
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 |
setNoCompressionStrongETag(boolean noCompressionStrongETag)
Deprecated.
|
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 |
setRejectIllegalHeaderName(boolean rejectIllegalHeaderName)
Deprecated.
Now an alias for
setRejectIllegalHeader(boolean).
Will be removed in Tomcat 10 onwards. |
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 |
setSessionCacheSize(int sessionCacheSize) |
void |
setSessionTimeout(int sessionTimeout) |
void |
setSSLCACertificateFile(String caCertificateFile) |
void |
setSSLCACertificatePath(String caCertificatePath) |
void |
setSSLCARevocationFile(String certificateRevocationListFile) |
void |
setSSLCARevocationPath(String certificateRevocationListPath) |
void |
setSSLCertificateChainFile(String certificateChainFile) |
void |
setSSLCertificateFile(String certificateFile) |
void |
setSSLCertificateKeyFile(String certificateKeyFile) |
void |
setSSLCipherSuite(String ciphers) |
void |
setSSLDisableCompression(boolean disableCompression) |
void |
setSSLDisableSessionTickets(boolean disableSessionTickets) |
void |
setSSLEnabled(boolean SSLEnabled) |
void |
setSslEnabledProtocols(String enabledProtocols) |
void |
setSSLHonorCipherOrder(boolean honorCipherOrder) |
void |
setSSLPassword(String certificateKeyPassword) |
void |
setSslProtocol(String sslProtocol) |
void |
setSSLProtocol(String sslProtocol) |
void |
setSSLVerifyClient(String certificateVerification) |
void |
setSSLVerifyDepth(int certificateVerificationDepth) |
void |
setTrustManagerClassName(String trustManagerClassName) |
void |
setTrustMaxCertLength(int certificateVerificationDepth) |
void |
setTruststoreAlgorithm(String truststoreAlgorithm) |
void |
setTruststoreFile(String truststoreFile) |
void |
setTruststorePass(String truststorePassword) |
void |
setTruststoreProvider(String truststoreProvider) |
void |
setTruststoreType(String truststoreType) |
void |
setUseKeepAliveResponseHeader(boolean useKeepAliveResponseHeader) |
void |
setUseSendfile(boolean useSendfile) |
void |
setUseServerCipherSuitesOrder(boolean honorCipherOrder) |
boolean |
useCompression(Request request,
Response response) |
addWaitingProcessor, awaitConnectionsClose, closeServerSocketGraceful, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAdapter, getAddress, getClientCertProvider, getConnectionCount, getConnectionLinger, getConnectionTimeout, getDomain, getExecutor, getGlobalRequestProcessorMBeanName, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getPortOffset, getPortWithOffset, getProcessorCache, getProperty, getTcpNoDelay, getThreadPriority, getUtilityExecutor, getWaitingProcessorCount, isAprRequired, isPaused, isSendfileSupported, pause, postDeregister, postRegister, preDeregister, preRegister, removeWaitingProcessor, resume, setAcceptCount, setAcceptorThreadCount, 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 initialisepublic void destroy()
throws Exception
ProtocolHandlerdestroy in interface ProtocolHandlerdestroy in class AbstractProtocol<S>Exception - If the protocol handler fails to destroyprotected 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 header@Deprecated public boolean getRejectIllegalHeaderName()
getRejectIllegalHeader(). Will be
removed in Tomcat 10 onwards.true if the request will be rejected or false if
the header will be ignored@Deprecated public void setRejectIllegalHeaderName(boolean rejectIllegalHeaderName)
setRejectIllegalHeader(boolean).
Will be removed in Tomcat 10 onwards.rejectIllegalHeaderName - 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)
@Deprecated public boolean getNoCompressionStrongETag()
@Deprecated public void setNoCompressionStrongETag(boolean noCompressionStrongETag)
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 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 UpgradeGroupInfo getUpgradeGroupInfo(String upgradeProtocol)
public ObjectName getONameForUpgrade(String upgradeProtocol)
public 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)
public String getSslEnabledProtocols()
public void setSslEnabledProtocols(String enabledProtocols)
public String getSSLProtocol()
public void setSSLProtocol(String sslProtocol)
public String getKeystoreFile()
public void setKeystoreFile(String keystoreFile)
public String getSSLCertificateChainFile()
public void setSSLCertificateChainFile(String certificateChainFile)
public String getSSLCertificateFile()
public void setSSLCertificateFile(String certificateFile)
public String getSSLCertificateKeyFile()
public void setSSLCertificateKeyFile(String certificateKeyFile)
public String getAlgorithm()
public void setAlgorithm(String keyManagerAlgorithm)
public String getClientAuth()
public void setClientAuth(String certificateVerification)
public String getSSLVerifyClient()
public void setSSLVerifyClient(String certificateVerification)
public int getTrustMaxCertLength()
public void setTrustMaxCertLength(int certificateVerificationDepth)
public int getSSLVerifyDepth()
public void setSSLVerifyDepth(int certificateVerificationDepth)
public boolean getUseServerCipherSuitesOrder()
public void setUseServerCipherSuitesOrder(boolean honorCipherOrder)
public boolean getSSLHonorCipherOrder()
public void setSSLHonorCipherOrder(boolean honorCipherOrder)
public String getCiphers()
public void setCiphers(String ciphers)
public String getSSLCipherSuite()
public void setSSLCipherSuite(String ciphers)
public String getKeystorePass()
public void setKeystorePass(String certificateKeystorePassword)
public String getKeyPass()
public void setKeyPass(String certificateKeyPassword)
public String getSSLPassword()
public void setSSLPassword(String certificateKeyPassword)
public String getCrlFile()
public void setCrlFile(String certificateRevocationListFile)
public String getSSLCARevocationFile()
public void setSSLCARevocationFile(String certificateRevocationListFile)
public String getSSLCARevocationPath()
public void setSSLCARevocationPath(String certificateRevocationListPath)
public String getKeystoreType()
public void setKeystoreType(String certificateKeystoreType)
public String getKeystoreProvider()
public void setKeystoreProvider(String certificateKeystoreProvider)
public String getKeyAlias()
public void setKeyAlias(String certificateKeyAlias)
public String getTruststoreAlgorithm()
public void setTruststoreAlgorithm(String truststoreAlgorithm)
public String getTruststoreFile()
public void setTruststoreFile(String truststoreFile)
public String getTruststorePass()
public void setTruststorePass(String truststorePassword)
public String getTruststoreType()
public void setTruststoreType(String truststoreType)
public String getTruststoreProvider()
public void setTruststoreProvider(String truststoreProvider)
public String getSslProtocol()
public void setSslProtocol(String sslProtocol)
public int getSessionCacheSize()
public void setSessionCacheSize(int sessionCacheSize)
public int getSessionTimeout()
public void setSessionTimeout(int sessionTimeout)
public String getSSLCACertificatePath()
public void setSSLCACertificatePath(String caCertificatePath)
public String getSSLCACertificateFile()
public void setSSLCACertificateFile(String caCertificateFile)
public boolean getSSLDisableCompression()
public void setSSLDisableCompression(boolean disableCompression)
public boolean getSSLDisableSessionTickets()
public void setSSLDisableSessionTickets(boolean disableSessionTickets)
public String getTrustManagerClassName()
public void setTrustManagerClassName(String trustManagerClassName)
protected Processor createProcessor()
AbstractProtocolcreateProcessor in class AbstractProtocol<S>protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
createUpgradeProcessor in class AbstractProtocol<S>Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.