Skip to main content

check_track_name

Function check_track_name 

Source
fn check_track_name(track_name: &[u8]) -> Result<(), CodecError>
Expand description

Refuse an empty Track Name.

Draft-23 Section 2.4.1: “Each Track Name MUST contain at least one byte. If an endpoint receives a Track Name with a length of 0, it MUST close the session with a PROTOCOL_VIOLATION.” The REDIRECT Error Detail is exempt: Section 9.4.2.1 requires its Track Name to be empty for namespace-scoped requests.

Decoders call it after the rest of the body, so a DELTA_ENCODING_OVERFLOW or FIELD_LENGTH_EXCEEDED later in the message is the one reported. Section 12.2: “When more than one code applies, an endpoint uses DELTA_ENCODING_OVERFLOW or FIELD_LENGTH_EXCEEDED in preference to the other codes.”