PcapFileEx.HTTP2.Headers (pcap_file_ex v0.5.5)
View SourceHTTP/2 headers container with pseudo-header and regular header separation.
HTTP/2 defines pseudo-headers that start with : and carry request/response
metadata. Regular headers follow standard HTTP semantics.
Pseudo-Headers
Request pseudo-headers:
:method- HTTP method (GET, POST, etc.):scheme- URI scheme (http, https):authority- Host and optional port:path- Request path
Response pseudo-headers:
:status- Response status code
Header Types
- Request headers: Contains
:methodpseudo-header - Response headers: Contains
:statuspseudo-header - Trailers: No pseudo-headers present (sent after body)
Summary
Functions
Get all headers (pseudo and regular) as a list.
Get the authority from request headers.
Create Headers from a list of {name, value} tuples.
Get a regular header value.
Get a regular header value as a single string.
Check if headers contain a specific pseudo-header.
Check if this is an informational response (1xx status).
Get the HTTP method from request headers.
Get the request path from request headers.
Check if these are request headers (contains :method).
Check if these are response headers (contains :status).
Get the scheme from request headers.
Get the status code from response headers.
Get the raw status string from response headers.
Get all regular headers as a list of {name, value} tuples.
Check if these are trailer headers (no pseudo-headers present).
Types
Functions
Get all headers (pseudo and regular) as a list.
Pseudo-headers come first, followed by regular headers.
Get the authority from request headers.
Create Headers from a list of {name, value} tuples.
Separates pseudo-headers (starting with :) from regular headers.
Handles duplicate headers by converting to a list.
Get a regular header value.
Returns nil if header not present, or the value (String or list of Strings).
Get a regular header value as a single string.
If the header has multiple values, joins them with ", ".
Check if headers contain a specific pseudo-header.
Check if this is an informational response (1xx status).
Get the HTTP method from request headers.
Get the request path from request headers.
Check if these are request headers (contains :method).
Check if these are response headers (contains :status).
Get the scheme from request headers.
Get the status code from response headers.
Returns the status as an integer, or nil if not present.
Get the raw status string from response headers.
Get all regular headers as a list of {name, value} tuples.
Multi-value headers are expanded to multiple tuples.
Check if these are trailer headers (no pseudo-headers present).
Trailers are headers sent after the body data in a request or response. They cannot contain pseudo-headers.