| Modifier and Type | Field and Description |
|---|---|
| private float | headerArraySizeAccumulator
Used to calculate an exponential moving average of header sizes to get an estimate of how large the data structure for storing headers should be. |
| private static final float | |
| private static final float | |
| private final HpackDecoder | |
| private long | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultHttp2HeadersDecoder(boolean
true to validate headers are valid according to the RFC.Create a new instance. |
| public | DefaultHttp2HeadersDecoder(boolean
true to validate headers are valid according to the RFC.
This validates everything except header values.true to validate that header values are valid according to the RFC.
Since this is potentially expensive, it can be enabled separately from validateHeaders.Create a new instance. |
| public | DefaultHttp2HeadersDecoder(boolean
true to validate headers are valid according to the RFC.This is the only setting that can be configured before notifying the peer.
This is because SETTINGS_MAX_HEADER_LIST_SIZE
allows a lower than advertised limit from being enforced, and the default limit is unlimited
(which is dangerous). maxHeaderListSize)Create a new instance. |
| public | DefaultHttp2HeadersDecoder(boolean
true to validate headers are valid according to the RFC.
This validates everything except header values.true to validate that header values are valid according to the RFC.
Since this is potentially expensive, it can be enabled separately from validateHeaders.This is the only setting that can be configured before notifying the peer.
This is because SETTINGS_MAX_HEADER_LIST_SIZE
allows a lower than advertised limit from being enforced, and the default limit is unlimited
(which is dangerous). maxHeaderListSize)Create a new instance. |
| pack-priv | DefaultHttp2HeadersDecoder(boolean validateHeaders, boolean validateHeaderValues, HpackDecoder hpackDecoder)
Exposed for testing only! |
| Modifier and Type | Method and Description |
|---|---|
| public Http2HeadersDecoder. | configuration()
Implements io. Configuration for this Http2HeadersDecoder
|
| public Http2Headers | decodeHeaders(int streamId, Buffer headerBlock)
Implements io. |
| public void | maxHeaderListSize(long
SETTINGS_MAX_HEADER_LIST_SIZE.
If this limit is exceeded the implementation should attempt to keep the HPACK header tables up to date
by processing data from the peer, but a max, long RST_STREAM frame will be sent for the offending stream.Must be goAwayMax)>= max. A GO_AWAY frame will be generated if this limit is exceeded
for any particular stream.Implements io. |
| public long | maxHeaderListSize()
Implements io. |
| public long | maxHeaderListSizeGoAway()
Implements io. GO_AWAY should be sent.
|
| public void | maxHeaderTableSize(long max)
Implements io. |
| public long | maxHeaderTableSize()
Implements io. |
| protected Http2Headers | Returns: a newHttp2Headers object which will store the results of the decode operation.Create a new |
| protected final int | Returns: an estimate of how many headers are expected during the decode process.A weighted moving average estimating how many headers are expected during the decode process. |
| protected final boolean | Returns: true if the headers should be validated as a result of the decode operation.Determines if the headers should be validated as a result of the decode operation. |
| protected boolean | Returns: true if the header values should be validated as a result of the decode operation.Determines if the header values should be validated as a result of the decode operation. |
| headerArraySizeAccumulator | back to summary |
|---|---|
| private float headerArraySizeAccumulator Used to calculate an exponential moving average of header sizes to get an estimate of how large the data structure for storing headers should be. | |
| HEADERS_COUNT_WEIGHT_HISTORICAL | back to summary |
|---|---|
| private static final float HEADERS_COUNT_WEIGHT_HISTORICAL | |
| HEADERS_COUNT_WEIGHT_NEW | back to summary |
|---|---|
| private static final float HEADERS_COUNT_WEIGHT_NEW | |
| hpackDecoder | back to summary |
|---|---|
| private final HpackDecoder hpackDecoder | |
| maxHeaderListSizeGoAway | back to summary |
|---|---|
| private long maxHeaderListSizeGoAway | |
| validateHeaders | back to summary |
|---|---|
| private final boolean validateHeaders | |
| validateHeaderValues | back to summary |
|---|---|
| private final boolean validateHeaderValues | |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| public DefaultHttp2HeadersDecoder() | |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| public DefaultHttp2HeadersDecoder(boolean validateHeaders) Create a new instance.
| |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| public DefaultHttp2HeadersDecoder(boolean validateHeaders, boolean validateHeaderValues) Create a new instance.
| |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| public DefaultHttp2HeadersDecoder(boolean validateHeaders, long maxHeaderListSize) Create a new instance.
| |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| public DefaultHttp2HeadersDecoder(boolean validateHeaders, boolean validateHeaderValues, long maxHeaderListSize) Create a new instance.
| |
| DefaultHttp2HeadersDecoder | back to summary |
|---|---|
| pack-priv DefaultHttp2HeadersDecoder(boolean validateHeaders, boolean validateHeaderValues, HpackDecoder hpackDecoder) Exposed for testing only! Default values used in the initial settings frame are overridden intentionally for testing but violate the RFC if used outside the scope of testing. | |
| configuration | back to summary |
|---|---|
| public Http2HeadersDecoder. Implements io. Doc from io. Get the
| |
| decodeHeaders | back to summary |
|---|---|
| public Http2Headers decodeHeaders(int streamId, Buffer headerBlock) throws Http2Exception Implements io. Doc from io. Decodes the given headers block and returns the headers.
| |
| maxHeaderListSize | back to summary |
|---|---|
| public void maxHeaderListSize(long max, long goAwayMax) throws Http2Exception Implements io. Doc from io. Configure the maximum allowed size in bytes of each set of headers.
This method should only be called by Netty (not users) as a result of a receiving a
| |
| maxHeaderListSize | back to summary |
|---|---|
| public long maxHeaderListSize() Implements io. Doc from io. Represents the value for SETTINGS_MAX_HEADER_LIST_SIZE.
| |
| maxHeaderListSizeGoAway | back to summary |
|---|---|
| public long maxHeaderListSizeGoAway() Implements io. Doc from io. Represents the upper bound in bytes for a set of headers before a
| |
| maxHeaderTableSize | back to summary |
|---|---|
| public void maxHeaderTableSize(long max) throws Http2Exception Implements io. Doc from io. Represents the value for
SETTINGS_HEADER_TABLE_SIZE.
This method should only be called by Netty (not users) as a result of a receiving a
| |
| maxHeaderTableSize | back to summary |
|---|---|
| public long maxHeaderTableSize() Implements io. Doc from io. Represents the value for
SETTINGS_HEADER_TABLE_SIZE. The initial value
returned by this method must be
| |
| newHeaders | back to summary |
|---|---|
| protected Http2Headers newHeaders() Create a new
| |
| numberOfHeadersGuess | back to summary |
|---|---|
| protected final int numberOfHeadersGuess() A weighted moving average estimating how many headers are expected during the decode process.
| |
| validateHeaders | back to summary |
|---|---|
| protected final boolean validateHeaders() Determines if the headers should be validated as a result of the decode operation. Note This does not include validation of header values, since that is potentially expensive to do. Value validation is instead enabled separately.
| |
| validateHeaderValues | back to summary |
|---|---|
| protected boolean validateHeaderValues() Determines if the header values should be validated as a result of the decode operation. Note This only validates the values of headers. All other header validations are instead enabled separately.
| |