fn check_extensions_against_status(
status: ObjectStatus,
extensions: &[u8],
) -> Result<(), CodecError>Expand description
Hold an object to the rule that a non-existent object carries no extensions.
Section 9.1.1.2: “Any Object may have extension headers except those with Object Status ‘Object Does Not Exist’. If an endpoint receives a non-existent Object containing extension headers it MUST close the session with a Protocol Violation.”
The sentence is about a receiver, and it reaches all three carriers that can announce a status: an object on a subgroup stream, an object on a fetch stream, and a status datagram. A plain datagram has no status field, so it is the only carrier that cannot break the rule.
Reported under CodecError::ExtensionsOnNonExistentObject, which is this
rule and nothing else. It was CodecError::InvalidField until now, shared
with a dozen unrelated malformations the draft does not answer with a close,
which left a caller unable to act on the sentence above.