Commit 3acc35a
committed
Add libmagic to better process mime_types on Linux
Problem: serving files as application/application-octext-stream
is annoying if the file is ASCII text
Solution:
When serving files on linux, libmagic can analyze the file
to determine filetype when mime_guess has failed. Use libmagic
to determine if a file is a plaintext file.
Signed-off-by: Michael Mullin <masmullin@gmail.com>1 parent 2712a92 commit 3acc35a
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
896 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
897 | 914 | | |
898 | 915 | | |
899 | 916 | | |
| |||
0 commit comments