-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
hugo server adds unnecessary charset parameter to Content-Type for images #10734
Comments
i suspect this is an upstream issue (we use the file server in the Go stdlib) -- and I suspect it's implemented this way for simplicity, and I'm not totally sure that it has any practical downside. |
It's been like this for years. Given that the server is not intended for production, I agree that there is no practical downside. It worked as expected in v0.54.0, but stopped working with v0.55.0. Git bisect says |
Seems like the behavior is implemented here: Line 939 in 9af78d1
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
Add an image to a site's
static
directory, runhugo server
, and look at the headers it gets served with:The
Content-Type
is set toimage/jpeg; charset=utf-8
, which is clearly wrong, as images don't have acharset
parameter.It's a minor issue, and I haven't noticed it actually breaking anything, but still, it's a bug.
The text was updated successfully, but these errors were encountered: