You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
checksum is a qualifier for one or more checksums stored as a comma-separated list. Each item in the value is in form of lowercase_algorithm:hex_encoded_lowercase_value
and an abbreviated example is given as checksum=sha1:ad9503c3e994a4f...
However, also according to the spec:
A [qualifier] value must be a percent-encoded string
And to build a purl sting which has qualifiers, one must
create a string by joining the lowercased key, the equal '=' sign and the percent-encoded value to create a qualifier
In a percent-encoded string, the colon character, ':', is encoded as '%3A'. And in fact the reference java implementation will encode the above as checksum=sha1%3Aad9503c3e994a4f...
The text was updated successfully, but these errors were encountered:
"Percent encoding" is just a means of encoding and does not specify what should be encoded.
The PURL spec says this colon does not need to be encoded: "the ':' scheme and type separator does not need to and must NOT be encoded. It is unambiguous unencoded everywhere".
However, if you're writing software that deals with PURLs, you should expect to see incoming PURLs like checksum=sha1:ad9503c3e994a4f (canonical), checksum=sha1%3Aad9503c3e994a4f (something generic like encodeURIComponent), or even checksum=%73%68%61%31%3A%61%64%39%35%30%33%63%33%65%39%39%34%61%34%66 (maximally encoded). Technically those are all valid and equal.
According to the spec:
and an abbreviated example is given as
checksum=sha1:ad9503c3e994a4f...
However, also according to the spec:
And to build a purl sting which has qualifiers, one must
In a percent-encoded string, the colon character, ':', is encoded as '%3A'. And in fact the reference java implementation will encode the above as
checksum=sha1%3Aad9503c3e994a4f...
The text was updated successfully, but these errors were encountered: