mirror of
https://github.com/vale981/lack
synced 2025-03-05 09:21:39 -05:00
Merge pull request #34 from slyrus/mime-lookup-2
use mimes:mime-lookup instead of mimes:mime
This commit is contained in:
commit
dee83e31f4
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,8 @@
|
||||||
(t file))))
|
(t file))))
|
||||||
|
|
||||||
(defun serve-path (file encoding)
|
(defun serve-path (file encoding)
|
||||||
(let ((content-type (mimes:mime file "text/plain"))
|
(let ((content-type (or (mimes:mime-lookup file)
|
||||||
|
"application/octet-stream"))
|
||||||
(univ-time (or (file-write-date file)
|
(univ-time (or (file-write-date file)
|
||||||
(get-universal-time))))
|
(get-universal-time))))
|
||||||
(when (starts-with-subseq "text" content-type)
|
(when (starts-with-subseq "text" content-type)
|
||||||
|
|
Loading…
Add table
Reference in a new issue