Author: achiumenti Date: Fri Nov 14 12:20:46 2008 New Revision: 144
Log: fixed welcome page redirection
Modified: trunk/main/claw-as/src/lisplet.lisp
Modified: trunk/main/claw-as/src/lisplet.lisp ============================================================================== --- trunk/main/claw-as/src/lisplet.lisp (original) +++ trunk/main/claw-as/src/lisplet.lisp Fri Nov 14 12:20:46 2008 @@ -203,7 +203,22 @@ (lisplet-check-authorization lisplet) (when (= (claw-return-code) +http-ok+) (if (and welcome-page (or (string= uri base-path) (string= uri (concatenate 'string base-path "/")))) - (funcall (cdr (assoc welcome-page (lisplet-pages lisplet)))) + (let* ((protocol (if (= (claw-server-port) + (connector-port (clawserver-connector *clawserver*))) + :http + :https)) + (port (if (equal protocol :http) + (if (claw-proxified-p) + (clawserver-proxy-http-port *clawserver*) + (claw-server-port)) + (if (claw-proxified-p) + (clawserver-proxy-https-port *clawserver*) + (claw-server-port))))) + (claw-redirect (if (ends-with-subseq "/" uri) + (format nil "~aindex.html" uri) + (format nil "~a/index.html" uri)) + :protocol protocol + :port port))) (lisplet-dispatch-request lisplet uri)))))
(defmethod lisplet-protect ((lisplet lisplet) location roles)