shouldIgnoreHeadersOrDataFrame() — netty Function Reference
Architecture documentation for the shouldIgnoreHeadersOrDataFrame() function in DefaultHttp2ConnectionDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ced1d4e9_b458_5358_c892_efa8534c4694["shouldIgnoreHeadersOrDataFrame()"] 0189a990_8f54_63f5_92fb_f168c031db1e["FrameReadListener"] ced1d4e9_b458_5358_c892_efa8534c4694 -->|defined in| 0189a990_8f54_63f5_92fb_f168c031db1e 8d250926_1eab_67b5_7ae5_94ae1e073f54["onDataRead()"] 8d250926_1eab_67b5_7ae5_94ae1e073f54 -->|calls| ced1d4e9_b458_5358_c892_efa8534c4694 a7f0343e_581c_7e4a_796e_4e4c426bb22e["onHeadersRead()"] a7f0343e_581c_7e4a_796e_4e4c426bb22e -->|calls| ced1d4e9_b458_5358_c892_efa8534c4694 081ac2df_dd8d_01c3_d08e_00974bf739a2["onPushPromiseRead()"] 081ac2df_dd8d_01c3_d08e_00974bf739a2 -->|calls| ced1d4e9_b458_5358_c892_efa8534c4694 695c4790_7bd4_bf0d_0e52_35e092024f50["streamCreatedAfterGoAwaySent()"] ced1d4e9_b458_5358_c892_efa8534c4694 -->|calls| 695c4790_7bd4_bf0d_0e52_35e092024f50 a2d8c4e1_92a0_ea7d_3a12_abc7419c584a["verifyStreamMayHaveExisted()"] ced1d4e9_b458_5358_c892_efa8534c4694 -->|calls| a2d8c4e1_92a0_ea7d_3a12_abc7419c584a style ced1d4e9_b458_5358_c892_efa8534c4694 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java lines 631–666
private boolean shouldIgnoreHeadersOrDataFrame(ChannelHandlerContext ctx, int streamId, Http2Stream stream,
boolean endOfStream, String frameName) throws Http2Exception {
if (stream == null) {
if (streamCreatedAfterGoAwaySent(streamId)) {
logger.info("{} ignoring {} frame for stream {}. Stream sent after GOAWAY sent",
ctx.channel(), frameName, streamId);
return true;
}
// Make sure it's not an out-of-order frame, like a rogue DATA frame, for a stream that could
// never have existed.
verifyStreamMayHaveExisted(streamId, endOfStream, frameName);
// Its possible that this frame would result in stream ID out of order creation (PROTOCOL ERROR) and its
// also possible that this frame is received on a CLOSED stream (STREAM_CLOSED after a RST_STREAM is
// sent). We don't have enough information to know for sure, so we choose the lesser of the two errors.
throw streamError(streamId, STREAM_CLOSED, "Received %s frame for an unknown stream %d",
frameName, streamId);
}
if (stream.isResetSent() || streamCreatedAfterGoAwaySent(streamId)) {
// If we have sent a reset stream it is assumed the stream will be closed after the write completes.
// If we have not sent a reset, but the stream was created after a GoAway this is not supported by
// DefaultHttp2Connection and if a custom Http2Connection is used it is assumed the lifetime is managed
// elsewhere so we don't close the stream or otherwise modify the stream's state.
if (logger.isInfoEnabled()) {
logger.info("{} ignoring {} frame for stream {}", ctx.channel(), frameName,
stream.isResetSent() ? "RST_STREAM sent." :
"Stream created after GOAWAY sent. Last known stream by peer " +
connection.remote().lastStreamKnownByPeer());
}
return true;
}
return false;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does shouldIgnoreHeadersOrDataFrame() do?
shouldIgnoreHeadersOrDataFrame() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java.
Where is shouldIgnoreHeadersOrDataFrame() defined?
shouldIgnoreHeadersOrDataFrame() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java at line 631.
What does shouldIgnoreHeadersOrDataFrame() call?
shouldIgnoreHeadersOrDataFrame() calls 2 function(s): streamCreatedAfterGoAwaySent, verifyStreamMayHaveExisted.
What calls shouldIgnoreHeadersOrDataFrame()?
shouldIgnoreHeadersOrDataFrame() is called by 3 function(s): onDataRead, onHeadersRead, onPushPromiseRead.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free