[bknr-cvs] r1940 - branches/xml-class-rework/bknr/src/web
bknr at bknr.net
bknr at bknr.net
Mon Mar 20 20:33:22 UTC 2006
Author: hhubner
Date: 2006-03-20 15:33:22 -0500 (Mon, 20 Mar 2006)
New Revision: 1940
Modified:
branches/xml-class-rework/bknr/src/web/handlers.lisp
Log:
Strip leading slashes in website-make-path
Modified: branches/xml-class-rework/bknr/src/web/handlers.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/web/handlers.lisp 2006-03-18 13:58:44 UTC (rev 1939)
+++ branches/xml-class-rework/bknr/src/web/handlers.lisp 2006-03-20 20:33:22 UTC (rev 1940)
@@ -85,9 +85,14 @@
(dolist (handler (website-handlers website))
(format t "~A => ~A~%" (uri-path (page-handler-url handler)) handler)))
-(defmethod website-make-path ((website website) relative-path)
- (format nil "~A~A" (website-base-href website) relative-path))
+(defun relative (path)
+ (if (eq #\/ (aref path 0))
+ (relative (subseq path 1))
+ path))
+(defmethod website-make-path ((website website) path)
+ (format nil "~A~A" (website-base-href website) (relative path)))
+
(defgeneric publish-handler (website handler))
(defgeneric publish-site (website))
More information about the Bknr-cvs
mailing list