You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It also seems to be defined like this internally (packages/utils/src/content-type.ts).
I just realised while writing: Might be an issue with the header parser and the "+" sign?
OR is "..., utf-8" not valid content type for SVG? Could not explicitly find any infos on that.
Greatly appreciate any feedback and hope to further improve your project if this is a bug.
Greets,
Chris
The text was updated successfully, but these errors were encountered:
I think in this case the format you're using to specify the character encoding in the content type header is incorrect. Updating your server config to send this format should work:
Given you've already been looking at the code, if you think you can update the logic to give a more helpful error in this case I'd be happy to review a PR.
Hi @antross and thanks for for your feedback! I got everything corrected.
Given you've already been looking at the code, if you think you can update the logic to give a more helpful error in this case I'd be happy to review a PR.
Just one notice:
When the charset header is not set, the hint is: hint #: 'content-type' header charset value should be 'utf-8'.
It might be good to change it to hint #: 'content-type' header charset value should be 'Content-Type: image/svg+xml; charset=utf-8'.
Whereas "Content-Type" can be whatever the hint refers to (=Info Area where the the current content type is visible)
I know, this is micro optimisation, but directly showing the expected header helps everyone that is doing "hand-on" work instead of "read-first".
Anyways, thanks for your time to solve my problem! Keep up the good work! I really like your tool!
🐞 Bug report
Description
Hi everybody,
I just checked your nice online tool to further improve my webpages, but somehow, I don't understand the following error and think that it is a bug:
hint #1: 'content-type' header value should be valid (invalid media type).
https://*/img/logo.10.svg
Content-Type: image/svg+xml, utf-8
Details
As far as I checked, the "image/svg+xml" is totally valid and seems to be the recommended for *.svg (https://www.w3.org/TR/SVG11/intro.html).
It also seems to be defined like this internally (packages/utils/src/content-type.ts).
I just realised while writing: Might be an issue with the header parser and the "+" sign?
OR is "..., utf-8" not valid content type for SVG? Could not explicitly find any infos on that.
Greatly appreciate any feedback and hope to further improve your project if this is a bug.
Greets,
Chris
The text was updated successfully, but these errors were encountered: