yesod-static: use mime-types >= 0.1.2.1 Content-Type for JS#1898
Conversation
|
Do you mind adding a patch version bump, changelog note? That helps us get it released @snoyberg @psibi @meteficha I don't have upload rights on Hackage for |
|
@parsonsmatt I have added you to hackage. |
|
I can do that. I think it would be prudent to upload yesod-static 1.6.1.1 and 1.6.1.2 independently beforehand since this change is of course going to restrict install plans just for the sake of the test suite. I was wondering if it would be better to just check for one of the two content types in the test suite. |
706842e to
619b876
Compare
Done. |
mime-types 0.1.2.1 changed the MIME type of JavaScript files to text/javascript. In most situation, it is unproblematic to also allow the old MIME type (application/javascript), so we don't need to arbitrarily restrict the lower bound on mime-types (this can still be done by users if necessary). Resolves yesodweb#1897.
619b876 to
f391ee1
Compare
|
Thanks for the note on the release - I've combined the two prior versions into a released 1.6.1.1, which would make this 1.6.1.2. |
| lookup "Content-Type" (simpleHeaders resp) `elem` | ||
| [ Just "text/javascript" -- mime-types >= 0.1.2.1 | ||
| , Just "application/javascript" -- mime-types <= 0.1.2.0 | ||
| ] |
|
idc about windows ci being broken tbqh |
Resolves #1897 in the simplest way. Unfortunately it is not possible to check for the fourth version component using CPP.
Before submitting your PR, check that you've:
@sincedeclarations to the Haddocks for new, public APIsAfter submitting your PR: