Closed SpecLad closed 8 months ago
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 597e418cb02883418f2cebb41400e8e61413f651 is the first bad commit.
Seems like the behavior is implemented here:
https://github.com/gohugoio/hugo/blob/9af78d11003ed22b6281e47e1ac19568cf1cca81/hugolib/site.go#L939
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.