Provide default MIME type of "application/octet-stream" for otherwise
authorChris Hanson <org/chris-hanson/cph>
Tue, 20 Sep 2005 19:23:15 +0000 (19:23 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 20 Sep 2005 19:23:15 +0000 (19:23 +0000)
unrecognized file types.

v7/src/ssp/mod-lisp.scm

index 3305a9d2ab9fb92e85795ce184d5cf1617eb06f3..947d5a32cd9cf0077e53a6c9167bfc815347a991 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: mod-lisp.scm,v 1.29 2005/09/17 01:20:50 cph Exp $
+$Id: mod-lisp.scm,v 1.30 2005/09/20 19:23:15 cph Exp $
 
 Copyright 2003,2004,2005 Massachusetts Institute of Technology
 
@@ -126,7 +126,9 @@ USA.
            (expand default-type handler)
            (begin
              (maybe-parse-post-variables request)
-             (let ((type (file-content-type pathname)))
+             (let ((type
+                    (or (file-content-type pathname)
+                        "application/octet-stream")))
                (expand type
                        (get-mime-handler type)))))))
     response))