NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.1k stars 291 forks source link

Use libmagic for better output MIME detection #1240

Closed 2xsaiko closed 1 year ago

2xsaiko commented 1 year ago

MIME::Types isn't flexible enough to detect the correct MIME type since it only goes off of the file name, which breaks for file names without extensions. This changes MIME detection to use libmagic which also takes the file contents into account. I took out the path that calls serve_static_file since that function also uses MIME::Types internally.

Closes #1184.