diff --git a/scheme/httpd/file-dir-handler.scm b/scheme/httpd/file-dir-handler.scm index f01d45e..8343860 100644 --- a/scheme/httpd/file-dir-handler.scm +++ b/scheme/httpd/file-dir-handler.scm @@ -212,10 +212,16 @@ (cond ((string-ci=? ext ".txt") 'text) ((or (string-ci=? ext ".doc") + (string-ci=? ext ".htm") (string-ci=? ext ".html") (string-ci=? ext ".rtf") + (string-ci=? ext ".pdf") + (string-ci=? ext ".dvi") + (string-ci=? ext ".ps") (string-ci=? ext ".tex")) 'doc) - ((or (string-ci=? ext ".gif") + ((or (string-ci=? ext ".bmp") + (string-ci=? ext ".gif") + (string-ci=? ext ".png") (string-ci=? ext ".jpg") (string-ci=? ext ".jpeg") (string-ci=? ext ".tiff") @@ -224,6 +230,7 @@ (string-ci=? ext ".mpg")) 'movie) ((or (string-ci=? ext ".au") (string-ci=? ext ".snd") + (string-ci=? ext ".mp3") (string-ci=? ext ".wav")) 'audio) ((or (string-ci=? ext ".tar") (string-ci=? ext ".zip") @@ -449,10 +456,13 @@ (define (file-extension->content-type fname) (let ((ext (file-name-extension fname))) (cond + ((string-ci=? ext ".htm") "text/html") ((string-ci=? ext ".html") "text/html") ((string-ci=? ext ".txt") "text/plain") + ((string-ci=? ext ".doc") "application/msword") ((string-ci=? ext ".gif") "image/gif") ((string-ci=? ext ".png") "image/png") + ((string-ci=? ext ".bmp") "image/bmp") ((or (string-ci=? ext ".jpg") (string-ci=? ext ".jpeg")) "image/jpeg") ((or (string-ci=? ext ".tiff") @@ -468,6 +478,7 @@ (string-ci=? ext ".latex")) "application/latex") ((string-ci=? ext ".zip") "application/zip") ((string-ci=? ext ".tar") "application/tar") + ((string-ci=? ext ".hqx") "application/mac-binhex40") ((string-ci=? ext ".ps") "application/postscript") ((string-ci=? ext ".pdf") "application/pdf") (else "application/octet-stream"))))