-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix missing charset for static js, css and svg resources #4058
Fix missing charset for static js, css and svg resources #4058
Conversation
d47f1e2
to
67276ce
Compare
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.
👍
contentType.match(ContentType.Image.SVG) && contentType.charset() == null -> contentType.withCharset( | ||
Charsets.UTF_8 | ||
) | ||
|
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.
Seems like there's quite a few other text-based mime types hidden under "application/*", like xml, rss, soap. Could add them in while you're in the neighbourhood.
f697e22
to
4c2012e
Compare
4c2012e
to
1b1657f
Compare
(cherry picked from commit c892bc0)
Subsystem
Server, Static
Motivation
KTOR-6655
application/javascript
obsoleted in favor oftext/javascript
(https://www.iana.org/assignments/media-types/application/javascript)svg
, it's optional parameter (https://www.w3.org/TR/SVG/mimereg.html)