[bknr-cvs] hans changed trunk/thirdparty/hunchentoot/misc.lisp
BKNR Commits
bknr at bknr.net
Mon Dec 8 15:15:25 UTC 2008
Revision: 4117
Author: hans
URL: http://bknr.net/trac/changeset/4117
Handle wildcarded filenames properly. Requests for files containing
wildcard characters will be responded to with a 404 response code instead
of an error.
U trunk/thirdparty/hunchentoot/misc.lisp
Modified: trunk/thirdparty/hunchentoot/misc.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/misc.lisp 2008-12-05 13:37:32 UTC (rev 4116)
+++ trunk/thirdparty/hunchentoot/misc.lisp 2008-12-08 15:15:24 UTC (rev 4117)
@@ -129,8 +129,9 @@
denoted by PATH. Send a content type header corresponding to
CONTENT-TYPE or \(if that is NIL) tries to determine the content
type via the file's suffix."
- (unless (and (fad:file-exists-p path)
- (not (fad:directory-exists-p path)))
+ (when (or (wild-pathname-p path)
+ (not (fad:file-exists-p path))
+ (fad:directory-exists-p path))
;; does not exist
(setf (return-code) +http-not-found+)
(throw 'handler-done nil))
More information about the Bknr-cvs
mailing list