-
Notifications
You must be signed in to change notification settings - Fork 379
yesod-static: use mime-types >= 0.1.2.1 Content-Type for JS #1898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
parsonsmatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will release today
| lookup "Content-Type" (simpleHeaders resp) `elem` | ||
| [ Just "text/javascript" -- mime-types >= 0.1.2.1 | ||
| , Just "application/javascript" -- mime-types <= 0.1.2.0 | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice!
|
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: