W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2023

Structured Fields: strict error handling (#2399)

From: Mark Nottingham <mnot@mnot.net>
Date: Mon, 27 Feb 2023 10:10:06 +1100
Message-Id: <A2061F64-9AEF-4A64-9BCD-CD140D766F15@mnot.net>
To: HTTP Working Group <ietf-http-wg@w3.org>

With my editor hat on:

Section 2, "Defining Structured Fields" says:

> When parsing fails, the entire field is ignored (see Section 4.2); in most situations, violating field-specific constraints should have the same effect. Thus, if a header is defined as an Item and required to be an Integer, but a String is received, the field will by default be ignored. If the field requires different error handling, this should be explicitly specified.

whereas Section 4.2 says:

> If parsing fails -- including when calling another algorithm -- the entire field value MUST be ignored (i.e., treated as if the field were not present in the section). This is intentionally strict, to improve interoperability and safety, and specifications referencing this document are not allowed to loosen this requirement.

Julian points out that this is inconsistent.

I see Section 4.2 applying to the behaviour of generic parser implementations, whereas Section 2 is allowing individual fields to specify fallback behaviour when parsing fails. I do agree this could be clarified, though.

I made an attempt here:


Mark Nottingham   https://www.mnot.net/
Received on Sunday, 26 February 2023 23:10:42 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 26 February 2023 23:10:43 UTC