Skip to content

Wrong MIME type when converting asset #200

@renaatdemuynck

Description

@renaatdemuynck

I am working on a filter that converts fonts to different formats (e.g. when I request 'myfont.woff' it will convert it on-the-fly from 'MyFont.OTF'). The problem is that the MIME type will be application/x-font-opentype instead of application/woff. I've tried setting the mime type of the asset inside the filter but it is being overwritten later by one of the resolvers. So I thought "How does the MimeResolver do this for LESS assets?". Apparently this works as expected for LESS files because the mime type for LESS is text/css (which technically isn't correct) (The same goes for SASS and CoffeScript too). The problem seems to be that the MIME type is being determined based on the source asset and not on the extension of the requested asset. Simply changing the behavior of determining the MIME type would break BC. So how and where could this be fixed? (Or am I missing something here?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions