Skip to content

Commit 35c3e25

Browse files
committed
Allow identifiers in items.
Fixes #629.
1 parent 0fd68ba commit 35c3e25

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

draft-ietf-httpbis-header-structure.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The ABNF for dictionaries in HTTP/1 headers is:
179179
~~~ abnf
180180
sh-dictionary = dict-member *( OWS "," OWS dict-member )
181181
dict-member = member-name "=" member-value
182-
member-name = identifier
182+
member-name = sh-identifier
183183
member-value = sh-item
184184
~~~
185185

@@ -227,9 +227,9 @@ The ABNF for parameterised lists in HTTP/1 headers is:
227227

228228
~~~ abnf
229229
sh-param-list = param-id *( OWS "," OWS param-id )
230-
param-id = identifier *parameter
230+
param-id = sh-identifier *parameter
231231
parameter = OWS ";" OWS param-name [ "=" param-value ]
232-
param-name = identifier
232+
param-name = sh-identifier
233233
param-value = sh-item
234234
~~~
235235

@@ -244,12 +244,12 @@ Parsers MUST support parameterised lists containing at least 1024 members, and s
244244

245245
## Items {#item}
246246

247-
An item is can be a integer ({{integer}}), float ({{float}}), string ({{string}}), byte sequence ({{binary}}), or Boolean ({{boolean}}).
247+
An item is can be a integer ({{integer}}), float ({{float}}), string ({{string}}), identifier ({{identifier}}), byte sequence ({{binary}}), or Boolean ({{boolean}}).
248248

249249
The ABNF for items in HTTP/1 headers is:
250250

251251
~~~ abnf
252-
sh-item = sh-integer / sh-float / sh-string / sh-binary / sh-boolean
252+
sh-item = sh-integer / sh-float / sh-string / sh-identifier / sh-binary / sh-boolean
253253
~~~
254254

255255

@@ -336,8 +336,8 @@ Identifiers are short textual identifiers; their abstract model is identical to
336336
The ABNF for identifiers in HTTP/1 headers is:
337337

338338
~~~ abnf
339-
identifier = lcalpha *( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
340-
lcalpha = %x61-7A ; a-z
339+
sh-identifier = lcalpha *( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
340+
lcalpha = %x61-7A ; a-z
341341
~~~
342342

343343
Note that identifiers can only contain lowercase letters.
@@ -457,8 +457,9 @@ Given an item as input:
457457
1. If input is an integer, return the result of applying Serialising an Integer {{ser-integer}} to input.
458458
2. If input is a float, return the result of applying Serialising a Float {{ser-float}} to input.
459459
3. If input is a string, return the result of applying Serialising a String {{ser-string}} to input.
460-
4. If input is a Boolean, return the result of applying Serialising a Boolean {{ser-boolean}} to input.
461-
5. Otherwise, return the result of applying Serialising a Byte Sequence {{ser-binary}} to input.
460+
4. If input is an identifier, return the result of Serialising an Identifier {#ser-identifier}.
461+
5. If input is a Boolean, return the result of applying Serialising a Boolean {{ser-boolean}} to input.
462+
6. Otherwise, return the result of applying Serialising a Byte Sequence {{ser-binary}} to input.
462463

463464

464465
### Serialising an Integer {#ser-integer}
@@ -647,7 +648,8 @@ Given an ASCII string input_string, return an item. input_string is modified to
647648
3. If the first character of input_string is a DQUOTE, process input_string as a string ({{parse-string}}) and return the result.
648649
4. If the first character of input_string is "\*", process input_string as a byte sequence ({{parse-binary}}) and return the result.
649650
5. If the first character of input_string is "!", process input_string as a Boolean ({{parse-boolean}}) and return the result.
650-
6. Otherwise, fail parsing.
651+
6. If the first character of input_string is a lcalpha, process input_string as an identifier ({{parse-identifier}}) and return the result.
652+
7. Otherwise, fail parsing.
651653

652654

653655
### Parsing a Number from Text {#parse-number}
@@ -804,6 +806,8 @@ _RFC Editor: Please remove this section before publication._
804806
* Changed "mapping" to "map" for #671.
805807
* Don't fail if byte sequences aren't "=" padded (#658).
806808
* Add Booleans (#683).
809+
* Allow identifiers in items again (#629).
810+
807811

808812
## Since draft-ietf-httpbis-header-structure-06
809813

0 commit comments

Comments
 (0)