-
Notifications
You must be signed in to change notification settings - Fork 214
Update 'qualifiers' rule in core spec #382 #398
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1c1fb31
Update 'qualifiers' rule in core spec #382
johnmhoran b621d65
Merge branch 'main' into 382-update-qualifiers-component
johnmhoran 17685b2
Simplify 'qualifiers', revise 'Character encoding' #382
johnmhoran 654e1b9
Merge branch 'main' into 382-update-qualifiers-component
johnmhoran 9d849b9
Adjust qualifiers and character encoding sections #382
johnmhoran ccf07c5
Update character encoding section and replace table with list #382
johnmhoran 2a13760
Merge branch 'main' into 382-update-qualifiers-component
johnmhoran 42e7ec0
Merge branch 'main' into 382-update-qualifiers-component
johnmhoran 9a7089b
Updates the qualifiers and percent-encoding sections #382
johnmhoran 898c64b
Fine-tune faq.rst #382
johnmhoran 3d2a128
Merge branch 'main' into 382-update-qualifiers-component
johnmhoran a990290
Move character-encoding work to new issue, fine-tune qualifiers #382
johnmhoran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ Scheme | |
|
|
||
| **QUESTION**: Can the ``scheme`` component be followed by a colon and two slashes, like a URI? | ||
|
|
||
| No. Since a ``purl`` never contains a URL Authority, its ``scheme`` should not be suffixed with double slash as in 'pkg://' and should use 'pkg:' instead. Otherwise this would be an invalid URI per RFC 3986 at https://tools.ietf.org/html/rfc3986#section-3.3:: | ||
| **ANSWER**: No. Since a ``purl`` never contains a URL Authority, its ``scheme`` should not be suffixed with double slash as in 'pkg://' and should use 'pkg:' instead. Otherwise this would be an invalid URI per RFC 3986 at https://tools.ietf.org/html/rfc3986#section-3.3:: | ||
|
|
||
| If a URI does not contain an authority component, then the path | ||
| cannot begin with two slash characters ("//"). | ||
|
|
@@ -24,9 +24,10 @@ For example, although these two purls are strictly equivalent, the first is in c | |
|
|
||
| pkg://gem/[email protected] | ||
|
|
||
|
|
||
| **QUESTION**: Is the colon between ``scheme`` and ``type`` encoded? Can it be encoded? If yes, how? | ||
|
|
||
| The "Rules for each ``purl`` component" section provides that "[t]he ``scheme`` MUST be followed by an unencoded colon ':'. | ||
| **ANSWER**: The "Rules for each ``purl`` component" section provides that the ``scheme`` MUST be followed by an unencoded colon ':'. | ||
|
|
||
| In this case, the colon ':' between ``scheme`` and ``type`` is being used as a separator, and consequently should be used as-is, never encoded and never requiring any decoding. Moreover, it should be a parsing error if the colon ':' does not come directly after 'pkg'. Tools are welcome to recover from this error to help with malformed purls, but that's not a requirement. | ||
|
|
||
|
|
@@ -37,10 +38,11 @@ Type | |
| **QUESTION**: What behavior is expected from a purl spec implementation if a | ||
| ``type`` contains a character like a slash '/' or a colon ':'? | ||
|
|
||
| The "Rules for each purl component" section provides that | ||
| **ANSWER**: The "Rules for each purl component" section provides that the | ||
| package ``type`` | ||
|
|
||
| [t]he package ``type`` MUST be composed only of ASCII letters and numbers, | ||
| '.', '+' and '-' (period, plus, and dash) | ||
| MUST be composed only of ASCII letters and numbers, period '.', plus '+', | ||
| and dash '-'. | ||
|
|
||
| As a result, a purl spec implementation must return an error when encountering | ||
| a ``type`` that contains a prohibited character. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.