Skip to content

Allow multiple MIME types for acceptance #629

Description

@fluffy-critter

There are some MIME types that have multiple variants in the wild, e.g. audio/mpegurl and audio/x-mpegurl. Right now the MIME type mapping assumes that the Accept header will match the Content-Type and that there is only one possible Content-Type. It would be ideal if the mimetype matcher thingy would allow multiple accepted MIME types for a given mapping, e.g.

    'template_mimetypes': {
        'canimus.yaml': ['application/canimus+yaml', 'application/yaml'],
        '.yaml': 'application/yaml',
        '.m3u': ['audio/mpegurl', 'audio/x-mpegurl']
    }

In this case, things could be accepted by multiple MIME types, and the first one in the list would be the default header if it was selected via URL rather than Accept:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions