PseudoHeaderName Type — netty Architecture
Architecture documentation for the PseudoHeaderName type/interface in Http3Headers.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d7543f9a_7b66_b3e4_4e98_821135749010["PseudoHeaderName"] 10f8df17_4b30_e52f_6b1b_904b67da0fb5["Http3Headers.java"] d7543f9a_7b66_b3e4_4e98_821135749010 -->|defined in| 10f8df17_4b30_e52f_6b1b_904b67da0fb5 style d7543f9a_7b66_b3e4_4e98_821135749010 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http3/src/main/java/io/netty/handler/codec/http3/Http3Headers.java lines 30–141
enum PseudoHeaderName {
/**
* {@code :method}.
*/
METHOD(":method", true, 0x1),
/**
* {@code :scheme}.
*/
SCHEME(":scheme", true, 0x2),
/**
* {@code :authority}.
*/
AUTHORITY(":authority", true, 0x4),
/**
* {@code :path}.
*/
PATH(":path", true, 0x8),
/**
* {@code :status}.
*/
STATUS(":status", false, 0x10),
/**
* {@code :protocol}.
* <p>
* Used for Extended CONNECT requests as defined in RFC 9220.
* This pseudo-header is only valid for CONNECT requests and indicates
* the desired protocol for the connection (e.g., "webtransport", "websocket").
*
* @see <a href="https://www.rfc-editor.org/rfc/rfc9220.html">RFC 9220: Bootstrapping WebSockets with HTTP/3</a>
*/
PROTOCOL(":protocol", true, 0x20);
private static final char PSEUDO_HEADER_PREFIX = ':';
private static final byte PSEUDO_HEADER_PREFIX_BYTE = (byte) PSEUDO_HEADER_PREFIX;
private final AsciiString value;
private final boolean requestOnly;
// The position of the bit in the flag indicates the type of the header field
private final int flag;
private static final CharSequenceMap<PseudoHeaderName> PSEUDO_HEADERS = new CharSequenceMap<PseudoHeaderName>();
static {
for (PseudoHeaderName pseudoHeader : PseudoHeaderName.values()) {
PSEUDO_HEADERS.add(pseudoHeader.value(), pseudoHeader);
}
}
PseudoHeaderName(String value, boolean requestOnly, int flag) {
this.value = AsciiString.cached(value);
this.requestOnly = requestOnly;
this.flag = flag;
}
public AsciiString value() {
// Return a slice so that the buffer gets its own reader index.
return value;
}
/**
* Indicates whether the specified header follows the pseudo-header format (begins with ':' character)
*
* @param headerName the header name to check.
* @return {@code true} if the header follow the pseudo-header format
*/
public static boolean hasPseudoHeaderFormat(CharSequence headerName) {
if (headerName instanceof AsciiString) {
final AsciiString asciiHeaderName = (AsciiString) headerName;
return asciiHeaderName.length() > 0 && asciiHeaderName.byteAt(0) == PSEUDO_HEADER_PREFIX_BYTE;
} else {
return headerName.length() > 0 && headerName.charAt(0) == PSEUDO_HEADER_PREFIX;
}
}
/**
* Indicates whether the given header name is a valid HTTP/3 pseudo header.
*
Source
Frequently Asked Questions
What is the PseudoHeaderName type?
PseudoHeaderName is a type/interface in the netty codebase, defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3Headers.java.
Where is PseudoHeaderName defined?
PseudoHeaderName is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/Http3Headers.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free