xregistry / spec

xRegistry related specifications
https://xRegistry.io
Apache License 2.0
35 stars 6 forks source link

Do we need to be more precise w.r.t. `contenttype`->`typemap` mapping? #116

Closed duglin closed 5 months ago

duglin commented 5 months ago

E.g. does text/html;charset=utf-8 match text/html ?

Proposal: just the type/sub-type of header value (parameters are excluded, anything after the first ; is ignoed).

Algorithm:

Note that "" is a valid char in a media type. Do we need to support escaping "\" in the pattern? Case insensitive compares - rfc: The type and subtype tokens are case-insensitive.

Another scenario:

What if a user does PUT {"contenttype": "foo/bar", "file": { "foo": "bar" } } ?

Proposal:

duglin commented 5 months ago

Agreed to all except the need to escape "*" - it's not a valid char per the media-type/mime spec