w3c / baggage

Propagation format for distributed context: Baggage
https://w3c.github.io/baggage/
Other
48 stars 18 forks source link

Requirement to strip OWS out of scope #58

Closed dyladan closed 2 years ago

dyladan commented 3 years ago

Currently the spec contains the following wording multiple times:

Leading and trailing whitespaces (OWS) are allowed but MUST be trimmed when converting the header into a data structure.

I believe this is beyond the scope of this specification. The specification should only refer to the expected wire-format of the data. How it is interpreted is up to the consumer and producer of the data.

SergeyKanzhelev commented 3 years ago

I think what we need to do is to say that values MAY be trimmed or OWS-ed without the change of a semantic

SergeyKanzhelev commented 3 years ago

same as http headers RFC does. We already refer to multi-value headers and they use this language, that appending and splitting values MUST Not change the semantic

dyladan commented 3 years ago

Appending and splitting is different than parsing it into a data structure. Making restrictions on how a program represents the header in memory is too restrictive.

I agree that appending and splitting must not change the semantic, but that's not what the sentence is about.

SergeyKanzhelev commented 3 years ago

we are in agreement. My comment was a suggestion on how to phrase what that sentence used to say better.

dyladan commented 3 years ago

I actually think wording about splitting/joining multiple headers is different from "parsing into a data structure".

Requirements about the parsed data structure are out of scope for the wire protocol. We shouldn't care if they decide to represent it as a nested object, a string, or a hex encoded byte array as long as they serialize it in a standard compatible way.

kalyanaj commented 2 years ago

Fixed by #87 .