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
Looks like Go 1.17 changed the source for mime types (golang/go#46013) it's no longer sources from mailcap using /etc/mime.types but from the Shared MIME-Info Database at /usr/share/mime/.
So if I use the official build from current version 2.4.3 and request a file from localhost/file.ign I get the correct header Content-Type: application/vnd.coreos.ignition+json. Building the same version with xcaddy with Go 1.17 will not set a content type because application/vnd.coreos.ignition+json is not part of the shared database on my system it looks like. More popular types like text/plain work fine.
Is there a way to make the lookup more consistent and remove the external dependency? Maybe embedding mime types in the Caddy binary?
The text was updated successfully, but these errors were encountered:
Think I'm going to close this, as it seems that having the MIME db properly installed on the system should resolve the issue; not really a Caddy bug. Thanks!
Looks like Go 1.17 changed the source for mime types (golang/go#46013) it's no longer sources from
mailcap
using/etc/mime.types
but from the Shared MIME-Info Database at/usr/share/mime/
.So if I use the official build from current version
2.4.3
and request a file fromlocalhost/file.ign
I get the correct headerContent-Type: application/vnd.coreos.ignition+json
. Building the same version with xcaddy with Go 1.17 will not set a content type becauseapplication/vnd.coreos.ignition+json
is not part of the shared database on my system it looks like. More popular types liketext/plain
work fine.Is there a way to make the lookup more consistent and remove the external dependency? Maybe embedding mime types in the Caddy binary?
The text was updated successfully, but these errors were encountered: