Description
Caddy uses the distribution provided /etc/mime.types file to set Content-Type headers on files, however not all systems ship with /etc/mime.types by default which is packaged as part of mailcap. Caddy packages from the official repositories do not require this package currently. Without this package, files may be sent to browsers without a Content-Type header. For example out of the box without mailcap installed on RHEL 8, Caddy does not set a Content-Type for txt files.
Relevant related comments and issues:
https://discussion.fedoraproject.org/t/caddy-caddy/8578/5
caddyserver/caddy#3190
caddyserver/caddy#3959
NGINX and Apache httpd bundle their own mime.types files avoiding the distribution mime.types.
https://github.com/nginx/nginx/blob/master/conf/mime.types
https://github.com/apache/httpd/blob/trunk/docs/conf/mime.types
Caddy would ideally bundle its own list of mime types in the long run to avoid relying on distributions to provide up to date correct and relevant mime types.
Activity