-
Notifications
You must be signed in to change notification settings - Fork 119
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
Require mailcap as a dependency for caddy repository packages #66
Comments
I don't think we want to take on the burden of bundling our own. I think it's better to rely on whatever the system has for you. /cc @carlwgeorge for the RPM package; I'll look into this for the DEB. |
@francislavoie on Debian 11 this file is provided by the media-types package and on Ubuntu 20.04 by the mime-support package |
So that's the trouble, the |
On RPM packaging this should not be an issue as you can conditionally require dependencies based on the distribution. Unsure about DEB packaging. Newer Debian and Ubuntu releases provide a transitional package meaning you could just require |
I'm not sure about this one. I think we could just update our installation instructions to have |
Has there been any changes in the documentation for this? Or any specific place in the docs that I could add this note? I just ran into this exact problem when I was troubleshooting why my Fastly CDN was not sending clients a There wasn't any warning or message or anything saying Caddy was missing My opinion is indifferent on whether Caddy should ship MIME types or not, but at least a more clear message somewhere and maybe an |
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.
The text was updated successfully, but these errors were encountered: