AbstractHttp11Protocol (Apache Tomcat 7.0.104 API Documentation)

org.apache.coyote.http11

## Class AbstractHttp11Protocol<S>

- java.lang.Object
- - org.apache.coyote.AbstractProtocol<S>
  - - org.apache.coyote.http11.AbstractHttp11Protocol<S>

- All Implemented Interfaces:
    MBeanRegistration, ProtocolHandler
  Direct Known Subclasses:
    AbstractHttp11JsseProtocol, Http11AprProtocol

      public abstract class AbstractHttp11Protocol<S>
      extends AbstractProtocol<S>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.coyote.AbstractProtocol

      `AbstractProtocol.AbstractConnectionHandler<S,P extends Processor<S>>, AbstractProtocol.RecycledProcessors<P extends Processor<S>,S>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static StringManager` | `sm`

    - ### Fields inherited from class org.apache.coyote.AbstractProtocol

      `adapter, clientCertProvider, domain, endpoint, mserver, oname, processorCache, rgOname, tpOname`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractHttp11Protocol()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAllowedTrailerHeader(String header)`
    `protected void` | `configureProcessor(AbstractHttp11Processor<S> processor)`
    `String` | `getAllowedTrailerHeaders()`
    `protected Set<String>` | `getAllowedTrailerHeadersAsSet()`
    `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` | `getCompressableMimeType()` Deprecated.
    `String` | `getCompressableMimeTypes()` Deprecated.
    `String` | `getCompressibleMimeType()`
    `String` | `getCompression()`
    `int` | `getCompressionMinSize()`
    `int` | `getConnectionUploadTimeout()` Specifies a different (usually longer) connection timeout during data upload.
    `boolean` | `getDisableUploadTimeout()` Get the flag that controls upload time-outs.
    `int` | `getMaxExtensionSize()`
    `int` | `getMaxHttpHeaderSize()`
    `int` | `getMaxKeepAliveRequests()` Maximum number of requests which can be performed over a keepalive connection.
    `int` | `getMaxSavePostSize()` Return the maximum size of the post which will be saved during FORM or CLIENT-CERT authentication.
    `int` | `getMaxSwallowSize()`
    `int` | `getMaxTrailerSize()`
    `boolean` | `getNoCompressionStrongETag()`
    `String` | `getNoCompressionUserAgents()`
    `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()`
    `boolean` | `getSecure()`
    `String` | `getServer()`
    `int` | `getSocketBuffer()`
    `int` | `getUpgradeAsyncWriteBufferSize()`
    `boolean` | `isSSLEnabled()`
    `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` | `setCompressableMimeType(String valueS)` Deprecated.
    `void` | `setCompressableMimeTypes(String valueS)` Deprecated.
    `void` | `setCompressibleMimeType(String valueS)`
    `void` | `setCompression(String compression)`
    `void` | `setCompressionMinSize(int compressionMinSize)`
    `void` | `setConnectionUploadTimeout(int timeout)` Set the upload timeout.
    `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)`
    `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)`
    `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 valueS)`
    `void` | `setSecure(boolean b)`
    `void` | `setServer(String server)` Set the server header name.
    `void` | `setSocketBuffer(int socketBuffer)`
    `void` | `setSSLEnabled(boolean SSLEnabled)`
    `void` | `setUpgradeAsyncWriteBufferSize(int upgradeAsyncWriteBufferSize)`

    - ### Methods inherited from class org.apache.coyote.AbstractProtocol

      `destroy, getAdapter, getAddress, getBacklog, getClientCertProvider, getConnectionCount, getConnectionTimeout, getDomain, getExecutor, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxCookieCount, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getProcessorCache, getProperty, getSoLinger, getSoTimeout, getTcpNoDelay, getThreadPriority, init, isAprRequired, pause, postDeregister, postRegister, preDeregister, preRegister, resume, setAdapter, setAddress, setBacklog, setClientCertProvider, setConnectionTimeout, setExecutor, setKeepAliveTimeout, setMaxConnections, setMaxCookieCount, setMaxHeaderCount, setMaxThreads, setMinSpareThreads, setPort, setProcessorCache, setProperty, setSoLinger, setSoTimeout, setTcpNoDelay, setThreadPriority, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

  - ### Constructor Detail

    - #### AbstractHttp11Protocol

          public AbstractHttp11Protocol()

  - ### Method Detail

    - #### getProtocolName

          protected String getProtocolName()

      Description copied from class: `AbstractProtocol`
      Obtain the name of the protocol, (Http, Ajp, etc.). Used with JMX.
      Specified by:
        `getProtocolName` in class `AbstractProtocol<S>`
      Returns:
        the protocol name

    - #### getRelaxedPathChars

          public String getRelaxedPathChars()

    - #### setRelaxedPathChars

          public void setRelaxedPathChars(String relaxedPathChars)

    - #### getRelaxedQueryChars

          public String getRelaxedQueryChars()

    - #### setRelaxedQueryChars

          public void setRelaxedQueryChars(String relaxedQueryChars)

    - #### getAllowHostHeaderMismatch

          public 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?
      Returns:
        `true` if Tomcat will allow such requests, otherwise `false`

    - #### setAllowHostHeaderMismatch

          public 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?
      Parameters:
        `allowHostHeaderMismatch` - `true` to allow such requests, `false` to reject them with a 400

    - #### getRejectIllegalHeader

          public 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?
      Returns:
        `true` if the request will be rejected or `false` if the header will be ignored

    - #### setRejectIllegalHeader

          public 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?
      Parameters:
        `rejectIllegalHeader` - `true` to reject requests with illegal header names or values, `false` to ignore the header

    - #### getRejectIllegalHeaderName

          @Deprecated
          public boolean getRejectIllegalHeaderName()

      Deprecated. Now an alias for `getRejectIllegalHeader()`. Will be removed in Tomcat 10 onwards.
      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?
      Returns:
        `true` if the request will be rejected or `false` if the header will be ignored

    - #### setRejectIllegalHeaderName

          @Deprecated
          public void setRejectIllegalHeaderName(boolean rejectIllegalHeaderName)

      Deprecated. Now an alias for `setRejectIllegalHeader(boolean)`. Will be removed in Tomcat 10 onwards.
      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?
      Parameters:
        `rejectIllegalHeaderName` - `true` to reject requests with illegal header names or values, `false` to ignore the header

    - #### getSocketBuffer

          public int getSocketBuffer()

    - #### setSocketBuffer

          public void setSocketBuffer(int socketBuffer)

    - #### getMaxSavePostSize

          public int getMaxSavePostSize()

      Return the maximum size of the post which will be saved during FORM or CLIENT-CERT authentication.
      Returns:
        The size in bytes

    - #### setMaxSavePostSize

          public void setMaxSavePostSize(int maxSavePostSize)

      Set the maximum size of a POST which will be buffered during FORM or CLIENT-CERT authentication. When a POST is received where the security constraints require a client certificate, the POST body needs to be buffered while an SSL handshake takes place to obtain the certificate. A similar buffering is required during FDORM auth.
      Parameters:
        `maxSavePostSize` - The maximum size POST body to buffer in bytes

    - #### getMaxHttpHeaderSize

          public int getMaxHttpHeaderSize()

    - #### setMaxHttpHeaderSize

          public void setMaxHttpHeaderSize(int valueI)

    - #### getConnectionUploadTimeout

          public int getConnectionUploadTimeout()

      Specifies a different (usually longer) connection timeout during data upload. Default is 5 minutes as in Apache HTTPD server.
      Returns:
        The timeout in milliseconds

    - #### setConnectionUploadTimeout

          public void setConnectionUploadTimeout(int timeout)

      Set the upload timeout.
      Parameters:
        `timeout` - Upload timeout in milliseconds

    - #### getDisableUploadTimeout

          public boolean getDisableUploadTimeout()

      Get the flag that controls upload time-outs. If true, the connectionUploadTimeout will be ignored and the regular socket timeout will be used for the full duration of the connection.
      Returns:
        `true` if the separate upload timeout is disabled

    - #### setDisableUploadTimeout

          public void setDisableUploadTimeout(boolean isDisabled)

      Set the flag to control whether a separate connection timeout is used during upload of a request body.
      Parameters:
        `isDisabled` - `true` if the separate upload timeout should be disabled

    - #### setCompression

          public void setCompression(String compression)

    - #### getCompression

          public String getCompression()

    - #### getNoCompressionUserAgents

          public String getNoCompressionUserAgents()

    - #### setNoCompressionUserAgents

          public void setNoCompressionUserAgents(String noCompressionUserAgents)

    - #### getCompressableMimeType

          @Deprecated
          public String getCompressableMimeType()

      Deprecated.

    - #### setCompressableMimeType

          @Deprecated
          public void setCompressableMimeType(String valueS)

      Deprecated.

    - #### getCompressableMimeTypes

          @Deprecated
          public String getCompressableMimeTypes()

      Deprecated.

    - #### setCompressableMimeTypes

          @Deprecated
          public void setCompressableMimeTypes(String valueS)

      Deprecated.

    - #### setCompressibleMimeType

          public void setCompressibleMimeType(String valueS)

    - #### getCompressibleMimeType

          public String getCompressibleMimeType()

    - #### getCompressionMinSize

          public int getCompressionMinSize()

    - #### setCompressionMinSize

          public void setCompressionMinSize(int compressionMinSize)

    - #### getNoCompressionStrongETag

          public boolean getNoCompressionStrongETag()

    - #### setNoCompressionStrongEtag

          public void setNoCompressionStrongEtag(boolean noCompressionStrongETag)

    - #### getRestrictedUserAgents

          public String getRestrictedUserAgents()

    - #### setRestrictedUserAgents

          public void setRestrictedUserAgents(String valueS)

    - #### getServer

          public String getServer()

    - #### setServer

          public void setServer(String server)

      Set the server header name.
      Parameters:
        `server` - The new value to use for the server header

    - #### getMaxTrailerSize

          public int getMaxTrailerSize()

    - #### setMaxTrailerSize

          public void setMaxTrailerSize(int maxTrailerSize)

    - #### getMaxExtensionSize

          public int getMaxExtensionSize()

    - #### setMaxExtensionSize

          public void setMaxExtensionSize(int maxExtensionSize)

    - #### getMaxSwallowSize

          public int getMaxSwallowSize()

    - #### setMaxSwallowSize

          public void setMaxSwallowSize(int maxSwallowSize)

    - #### getSecure

          public boolean getSecure()

    - #### setSecure

          public void setSecure(boolean b)

    - #### getUpgradeAsyncWriteBufferSize

          public int getUpgradeAsyncWriteBufferSize()

    - #### setUpgradeAsyncWriteBufferSize

          public void setUpgradeAsyncWriteBufferSize(int upgradeAsyncWriteBufferSize)

    - #### setAllowedTrailerHeaders

          public void setAllowedTrailerHeaders(String commaSeparatedHeaders)

    - #### getAllowedTrailerHeaders

          public String getAllowedTrailerHeaders()

    - #### addAllowedTrailerHeader

          public void addAllowedTrailerHeader(String header)

    - #### removeAllowedTrailerHeader

          public void removeAllowedTrailerHeader(String header)

    - #### getAllowedTrailerHeadersAsSet

          protected Set<String> getAllowedTrailerHeadersAsSet()

    - #### isSSLEnabled

          public boolean isSSLEnabled()

    - #### setSSLEnabled

          public void setSSLEnabled(boolean SSLEnabled)

    - #### getMaxKeepAliveRequests

          public int getMaxKeepAliveRequests()

      Maximum number of requests which can be performed over a keepalive connection. The default is the same as for Apache HTTP Server.

    - #### setMaxKeepAliveRequests

          public void setMaxKeepAliveRequests(int mkar)

    - #### configureProcessor

          protected void configureProcessor(AbstractHttp11Processor<S> processor)

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.