[bknr-cvs] r2279 - branches/trunk-reorg/thirdparty/hunchentoot-0.14.6

bknr at bknr.net bknr at bknr.net
Wed Nov 14 07:31:07 UTC 2007


Author: hhubner
Date: 2007-11-14 02:31:01 -0500 (Wed, 14 Nov 2007)
New Revision: 2279

Modified:
   branches/trunk-reorg/thirdparty/hunchentoot-0.14.6/misc.lisp
Log:
Fix for OpenMCL, ENOUGH-NAMESTRING should be used only for path names,
not URIs.


Modified: branches/trunk-reorg/thirdparty/hunchentoot-0.14.6/misc.lisp
===================================================================
--- branches/trunk-reorg/thirdparty/hunchentoot-0.14.6/misc.lisp	2007-11-14 07:13:33 UTC (rev 2278)
+++ branches/trunk-reorg/thirdparty/hunchentoot-0.14.6/misc.lisp	2007-11-14 07:31:01 UTC (rev 2279)
@@ -177,6 +177,9 @@
       (lambda ()
         (handle-static-file path content-type)))))
 
+(defun enough-url (url url-prefix)
+  (subseq url (mismatch url url-prefix)))
+
 (defun create-folder-dispatcher-and-handler (uri-prefix base-path &optional content-type)
   "Creates and returns a dispatch function which will dispatch to a
 handler function which emits the file relative to BASE-PATH that is
@@ -193,8 +196,8 @@
     (error "~S is supposed to denote a directory." base-path))
   (flet ((handler ()
            (let* ((script-name (url-decode (script-name)))
-                  (script-path (enough-namestring (regex-replace-all "\\\\" script-name "/")
-                                                  uri-prefix))
+                  (script-path (enough-url (regex-replace-all "\\\\" script-name "/")
+                                           uri-prefix))
                   (script-path-directory (pathname-directory script-path)))
              (unless (or (stringp script-path-directory)
                          (null script-path-directory)




More information about the Bknr-cvs mailing list