Skip to content

Introduce the concept of a best-practice representation? #81

Open
@halostatue

Description

@halostatue

Right now, MIME::Types has two main representations of a MIME content type:

  • content_type: a presentation value from the MIME type registry and should not be used for comparison. The case of the content type is preserved, and extension markers (x-) are kept.
  • simplified: a comparison value, mostly used for sorting. It strips extension markers (x-) and converts to lowercase. The problem here is that application/x-www-url-form-encoded must have the x- present or it is incorrect, even though this fixes for the case of audio/QCELP sorting too early because of the capitalization of QCELP.

Should there be a best-practice representation created as well (see #76, #80)? This might be:

  • best_practice (or mime_type): a lowercase representation of content_type. This would protect the sort of audio/QCELP and keep application/x-www-url-form-encoded legit.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions