Module io.netty.codec.http2
Package io.netty5.handler.codec.http2
Interface Http2PromisedRequestVerifier
-
@UnstableApi public interface Http2PromisedRequestVerifier
Provides an extensibility point for users to define the validity of push requests.- See Also:
- [RFC 7540], Section 8.2.
-
-
Field Summary
Fields Modifier and Type Field Description static Http2PromisedRequestVerifier
ALWAYS_VERIFY
A default implementation ofHttp2PromisedRequestVerifier
which always returns positive responses for all verification challenges.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers)
Determine if aHttp2Headers
are authoritative for a particularChannelHandlerContext
.boolean
isCacheable(Http2Headers headers)
Determine if a request is cacheable.boolean
isSafe(Http2Headers headers)
Determine if a request is safe.
-
-
-
Field Detail
-
ALWAYS_VERIFY
static final Http2PromisedRequestVerifier ALWAYS_VERIFY
A default implementation ofHttp2PromisedRequestVerifier
which always returns positive responses for all verification challenges.
-
-
Method Detail
-
isAuthoritative
boolean isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers)
Determine if aHttp2Headers
are authoritative for a particularChannelHandlerContext
.- Parameters:
ctx
- The context on which theheaders
where received on.headers
- The headers to be verified.- Returns:
true
if thectx
is authoritative for theheaders
,false
otherwise.- See Also:
- [RFC 7540], Section 10.1.
-
isCacheable
boolean isCacheable(Http2Headers headers)
Determine if a request is cacheable.- Parameters:
headers
- The headers for a push request.- Returns:
true
if the request associated withheaders
is known to be cacheable,false
otherwise.- See Also:
- [RFC 7231], Section 4.2.3.
-
isSafe
boolean isSafe(Http2Headers headers)
Determine if a request is safe.- Parameters:
headers
- The headers for a push request.- Returns:
true
if the request associated withheaders
is known to be safe,false
otherwise.- See Also:
- [RFC 7231], Section 4.2.1.
-
-