Skip to content

Commit 3708e51

Browse files
authored
Merge pull request #130 from dyladan/character-code-point
Use the term code point where character may be ambiguous
2 parents cc6e1ae + 1557cfb commit 3708e51

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

baggage/HTTP_HEADER_FORMAT.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Header name: `baggage`
1212
In order to increase interoperability across multiple protocols and encourage successful integration,
1313
implementations SHOULD keep the header name lowercase.
1414

15+
## Header Encoding
16+
17+
This header is a [[UTF-8]] encoded [[UNICODE]] string, however it uses only code points from the Basic Latin Unicode Block which are encoded identically in both Unicode and [[ASCII]].
18+
1519
## Header Content
1620

1721
This section uses the Augmented Backus-Naur Form (ABNF) notation of [[!RFC5234]].
@@ -50,17 +54,17 @@ Leading and trailing whitespaces (`OWS`) are allowed and are not considered to b
5054

5155
#### value
5256

53-
A value contains a string whose character encoding MUST be UTF-8 [[Encoding]].
54-
Any characters outside of the `baggage-octet` range of characters MUST be percent-encoded.
55-
The percent character MUST be percent-encoded.
56-
Characters which are not required to be percent-encoded MAY be percent-encoded.
57+
A string which contains a value identified by the `key`.
58+
Any code points outside of the `baggage-octet` range MUST be percent-encoded.
59+
The percent code point (`U+0025`) MUST be percent-encoded.
60+
Code points which are not required to be percent-encoded MAY be percent-encoded.
5761
Percent-encoding is defined in [[RFC3986]], Section 2.1: https://datatracker.ietf.org/doc/html/rfc3986#section-2.1.
5862

59-
When decoding the value, percent-encoded octet sequences that do not match the UTF-8 encoding scheme MUST be replaced with the replacement character (U+FFFD).
63+
When decoding the value, percent-encoded octet sequences that do not match the UTF-8 encoding scheme MUST be replaced with the replacement code point (`U+FFFD`).
6064

6165
Leading and trailing whitespaces (`OWS`) are allowed and are not considered to be a part of the value.
6266

63-
Note, `value` MAY contain any number of the equal sign (`=`) characters. Parsers
67+
Note, `value` MAY contain any number of the equal sign (`U+003D`) code points. Parsers
6468
MUST NOT assume that the equal sign is only used to separate `key` and `value`.
6569

6670
#### property
@@ -110,7 +114,7 @@ Single header:
110114
baggage: userId=alice,serverNode=DF%2028,isProduction=false
111115
```
112116

113-
Here is one more example where values with characters outside of the `baggage-octet` range of characters are percent-encoded. Consider the entry: `userId="Amélie"`, `serverNode="DF 28"`, `isProduction=false`:
117+
Here is one more example where values with characters outside of the `baggage-octet` range are percent-encoded. Consider the entry: `userId="Amélie"`, `serverNode="DF 28"`, `isProduction=false`:
114118

115119
```
116120
baggage: userId=Am%C3%A9lie,serverNode=DF%2028,isProduction=false

0 commit comments

Comments
 (0)