core-wg / href

Other
2 stars 0 forks source link

PET: P can be binary #17

Closed chrysn closed 2 years ago

chrysn commented 2 years ago

Now that we use PET for non-ideally-encoded data, we might just as well use bstr for the pet. This will allow expressing URIs like http://example.com/NonUtf8%FFEncoding. (We already list them in "constraints by example", and https://www.bittorrent.org/beps/bep_0017.html is a practical example of how they'd come to be).

chrysn commented 2 years ago

By the way, can CDDL say something like pet = bytes .size (1..) to indicate a minimum but no maximum size? (Just because empty pets would be a denormalized for of text-or-pet easily caught with such an expression).

cabo commented 2 years ago

Simpler would be

pet = bytes .ne ''
chrysn commented 2 years ago

Thanks, good point.

Objections to me making that into a combined PR?

cabo commented 2 years ago

Looks good to me.