-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify encoding of colon between scheme and type #361
base: master
Are you sure you want to change the base?
Conversation
The colon separator between scheme and type must not be encoded. This is also using, a new, and not yet adopted wording for MUST according to its definition in RFC2119 as clarified in RFC8174 Suggested-by: @gernot-h Reference: #39 (comment) Signed-off-by: Philippe Ombredanne <[email protected]>
Great, thx for addressing this! I think this makes very clear that special characters must not be encoded as separators. |
@@ -247,8 +247,9 @@ Use these rules for percent-encoding and decoding ``purl`` components: | |||
- the '#', '?', '@' and ':' characters must NOT be encoded when used as | |||
separators. They may need to be encoded elsewhere |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fully address the confusion of #39, I would probably also change the last sentence in the para before:
separators. They may need to be encoded elsewhere | |
separators. Some of them need to be encoded elsewhere as specified in the rules below. |
I think, this would also make clearer where they need to be encoded.
It is unambiguous unencoded everywhere | ||
- The colon ':' separator between ``scheme`` and ``type`` MUST NOT be encoded. | ||
For example, in the PURL snippet ``pkg:npm`` the colon ':' MUST NOT be encoded, | ||
and the PURL snippet ``pkg%3Anpm`` is invalid. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gernot-h @pombredanne Consider adding at the top of the file, perhaps as a new one-line paragraph following the current first paragraph, something along the lines of the following:
This specification uses RFC 2119 (https://datatracker.ietf.org/doc/html/rfc2119), as clarified in RFC 8174 (https://datatracker.ietf.org/doc/html/rfc8174), for the interpretation of certain terms, e.g.,
MUST NOT
.
Or perhaps a slight modification to the example provided by RFC 2119:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119, as clarified in RFC 8174.
(Note that the core spec currently contains a great deal of language that will need to be modified to implement RFC 2119/8174.)
The colon separator between scheme and type must not be encoded.
This is also using, a new, and not yet adopted wording for MUST according to its definition in RFC2119 as clarified in RFC8174
Suggested-by: @gernot-h
Reference: #39 (comment)