Skip to main content

check_no_duplicate_parameters

Function check_no_duplicate_parameters 

Source
fn check_no_duplicate_parameters(
    parameters: &[KeyValuePair],
) -> Result<(), CodecError>
Expand description

Refuse a parameter list that names the same Parameter Type twice.

Section 8.1: “Senders MUST NOT repeat the same parameter type in a message. Receivers SHOULD check that there are no duplicate parameters and close the session as a ‘Protocol Violation’ if found.”

Applied on both sides. Code that scans a parameter list for a key takes whichever copy it meets first, so one frame carrying two values for one type is read differently by two conforming implementations - which is what makes the sender’s half a MUST NOT rather than advice.