keptHeader static method
Whether a response header of this name belongs in a committed recording.
Two kinds are refused. Credentials, because a recording is a file in
a repository and a session is not: Set-Cookie is the one that would
actually leak, and its neighbours are here so the rule reads as a rule.
And the transfer's own description — Content-Encoding,
Content-Length, Transfer-Encoding and the connection pair — because
what is stored is the body after decoding, so a header saying it is
gzipped and 812 bytes long would be a header about bytes that are
neither. Content-Type is not here because it has a field of its own.
Implementation
static bool keptHeader(String name) => !_dropped.contains(name.toLowerCase());