@@ -218,14 +218,39 @@ Known-fields (they must be lowercase):
218218- ` name `
219219- ` description `
220220- ` author `
221- - ` hints ` : a map of * hints* . See section below for known hints
221+ - ` hints ` : a map of * hints* . See below.
222+
223+ The known fields-list may be expanded as this specification is developed. To
224+ include custom information in the header, we recommend using custom fields or hints.
225+
226+ Custom fields:
227+
228+ - Fields starting with ` x- ` or ` X- ` are considered custom. Users can freely
229+ include them in the header and implementations can support them as needed.
230+ - Custom fields are not a property of each block item as "header hints" are
231+ considered to be.
232+
233+ In order to parse the header, implementations should read the denylist until a
234+ ` --- ` is found or the 1MiB limit is reached. If the ` --- ` is found, they
235+ should attempt parsing the header as YAML:
236+
237+ - If parsing the header fails, they should abort and signal an error.
238+ - If the size limit is reached, they should assume the list includes no header
239+ and start parsing block items from the beginning of the denylist. A header
240+ that was too large will be parsed line by line as block items and error
241+ accordingly line per line, without causing excessive resource allocation.
242+
222243
223244#### Hints
224245
225- A * hint* is a key-value duple associated to the denylist as a whole (part of the header), or to a specific \< block_item\> .
246+ A * hint* is a key-value duple associated to a \< block_item\> . the denylist as
247+ a whole (part of the header), or to a specific \< block_item\> .
226248
227- Header hints can be used to set denylist-wide options or information that
228- implementations can choose to interpret or not.
249+ A list of hints can optionally follow every \< block_item\> as show
250+ above. Hints can also be specified in the denylist header ("header
251+ hints"). This is equivalent to adding the same hints to every single
252+ \< block_item\> in the denylist. Implementations should associate both the
253+ specific and the header hints to every block rule.
229254
230255#### List body
231256
0 commit comments