From: Chris Hanson Date: Thu, 31 Mar 2005 05:24:39 +0000 (+0000) Subject: Fix error generated when requested URL is a non-existing file. X-Git-Tag: 20090517-FFI~1340 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=55d078f668a8fe83c4931146b7e671c94a402391;p=mit-scheme.git Fix error generated when requested URL is a non-existing file. --- diff --git a/v7/src/ssp/mod-lisp.scm b/v7/src/ssp/mod-lisp.scm index 7584fc4cb..f44a9fc67 100644 --- a/v7/src/ssp/mod-lisp.scm +++ b/v7/src/ssp/mod-lisp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: mod-lisp.scm,v 1.27 2005/02/19 04:35:28 cph Exp $ +$Id: mod-lisp.scm,v 1.28 2005/03/31 05:24:39 cph Exp $ Copyright 2003,2004,2005 Massachusetts Institute of Technology @@ -113,7 +113,14 @@ USA. (set-content-type-header response default-type) (if handler (mod-lisp-expander request response pathname handler) - (set-entity response (->pathname pathname)))))) + (let ((pathname (->pathname pathname))) + (if (file-regular? pathname) + (set-entity response pathname) + (status-response! response + 404 + (list "The document " + (http-message-url request) + " can't be found.")))))))) (receive (handler default-type) (http-message-handler request) (if handler (expand default-type handler)