seleniumbase_rs_codec::akamai parses and renders Akamai HTTP/2 fingerprint
strings, in the format of Akamai’s public whitepaper on passive HTTP/2
fingerprinting: four sections separated by |.
- SETTINGS is
id:valuepairs joined by;, in the order the frame carried them. WINDOW_UPDATEis the connection-level increment, or0when no frame was sent.- PRIORITY is
stream:exclusive:depends_on:weightentries joined by,, or0for none. The weight is the protocol weight, 1 to 256 (the wire byte plus one). - The pseudo-header order is a permutation of
m,a,s,p(:method,:authority,:scheme,:path).
Parsing is strict about what can exist on the wire: canonical decimal numbers
only, each SETTINGS id once, weights in 1 to 256, stream ids below 2^31. What a
given client stack can emit is a separate question, answered by
H2Spec.
Akamai#
struct
A parsed Akamai HTTP/2 fingerprint. The fields are public so a caller can build
one directly; Akamai::parse is the validating constructor, and
H2Spec::with_akamai checks again whatever it is given. Display writes the
canonical string and FromStr parses, so a canonical string round-trips.
SETTINGS entries (id, value) in the order the frame carried them.
The connection-level WINDOW_UPDATE increment; 0 means no frame.
PRIORITY frames in the order they were sent.
The order of the four request pseudo-headers.
Akamai::parse#
method
Parses an Akamai fingerprint string. Leading and trailing whitespace is ignored;
nothing inside the string is. Returns an AkamaiError naming the section and
entry that is malformed.
PriorityFrame#
struct
One PRIORITY frame, in the Akamai notation stream:exclusive:depends_on:weight
(its Display, with exclusive written 0 or 1).
The stream the frame prioritises.
Whether the dependency is exclusive.
The stream this one depends on.
The protocol weight, 1 to 256 (the wire byte plus one).
Pseudo#
enum
A request pseudo-header, as named in the pseudo-header order section. This is the
complete set of pseudo-headers of a plain request, so the enum is not
non_exhaustive: a pseudo-header order is a permutation of exactly these four.
In JSON it is written in lower case ("method", "authority", …).
ALL is the order m,a,s,p. letter and header_name give the letter and the
header name (:method); from_letter accepts lowercase letters only, and
from_header_name the exact name.
AkamaiError#
enum
Why an Akamai string was refused. index is the zero-based position of the
entry and token the offending text.
Constants#
constThe largest stream id, dependency id or window increment (2^31 - 1, the top bit is reserved); the smallest and largest protocol weight (the wire byte is one less); the longest string accepted, in bytes; and the most SETTINGS and PRIORITY entries in one string.