Expand description
Typed Session header — RFC 2326 §12.37 (private/specs-verified/rtp/rtsp-runtime/rfc2326.md, private/specs-verified/rtp/rtsp-runtime/session-header.md).
Session = "Session" ":" session-id [ ";" "timeout" "=" delta-seconds ]session-id (§3.4) is 1*( ALPHA | DIGIT | safe ) with
safe = "$" | "-" | "_" | "." | "+"; identifiers are opaque and a parser must not
reject short ones. delta-seconds is 1*DIGIT; the timeout defaults to 60 s
when absent.
Lenient on input, canonical on output (the interop table is in
private/specs-verified/rtp/rtsp-runtime/session-header.md): LWS around ; and =, case-insensitive parameter
names, a bad or zero timeout value keeps the id and falls back to the default (with a
warning, see SessionHeader::parse_with_warnings), unknown parameters are
preserved. The session id is everything before the first ; outside a
quoted-string, LWS-trimmed; when the quotes do not balance (an unterminated
quote) the id is instead everything before the first ;, so ab"c;timeout=30
keeps id ab"c and timeout 30 rather than swallowing the ;. On RECEIVE any
non-empty id without a control
character is accepted verbatim ("weird", a b, abc,def, ab"c: real servers
send them and the client echoes them back unchanged). Only what we EMIT is strict
(non-empty, trimmed, no control characters, representable). Output is always
id[;timeout=N][;ext[=value]]… with no whitespace.
Structs§
- Session
Header - A parsed
Sessionheader (RFC 2326 §12.37).
Constants§
- DEFAULT_
SESSION_ TIMEOUT - §12.37: the session timeout when none is declared.