util: render and parse names in the MoQT safe form - #532
Conversation
gmarzot
left a comment
There was a problem hiding this comment.
@gmarzot reviewed 5 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on afrind).
|
mmmm ... "injective" but not "surjective"
|
Ok clear evidence I did not write the commit summary |
5a296d6 to
c59da3a
Compare
gmarzot
left a comment
There was a problem hiding this comment.
@gmarzot reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on afrind).
safeName() renders MoQT namespaces and track names in the form RECOMMENDED by moq-transport, "Representing Namespace and Track Names"; parseSafeBytes(), parseSafeNamespace() and parseSafeFullTrackName() invert it. The encoding is injective, so callers that key on the result — metric labels, filenames, authorization schemes — cannot have two distinct names collapse onto one rendering, while names made of ordinary characters stay readable. Parsing splits a full name at the last "--", which stays unambiguous because an encoded track name never contains a hyphen.
c59da3a to
9177ad5
Compare
safeName() renders MoQT namespaces and track names in the form RECOMMENDED by moq-transport, "Representing Namespace and Track Names"; parseSafeBytes(), parseSafeNamespace() and parseSafeFullTrackName() invert it.
The encoding is injective, so callers that key on the result — metric labels, filenames, authorization schemes — cannot have two distinct names collapse onto one rendering, while names made of ordinary characters stay readable. Parsing splits a full name at the last "--", which stays unambiguous because an encoded track name never contains a hyphen.
This change is