On Sun Jan 14, 2007 at 06:19:30AM -0800, Jeffrey Cunningham wrote:
On Sun Jan 14, 2007 at 12:07:56PM +0200, Yoni Rabkin Katzenell wrote:
Yoni Rabkin Katzenell yoni-r@actcom.com writes:
--- test_original.lisp 2007-01-14 10:56:18.000000000 +0200 +++ test.lisp 2007-01-14 10:55:15.000000000 +0200 @@ -474,6 +474,7 @@ (with-html (:html (:head
(:link :rel "shortcut icon" :href "/hunchentoot/test/favicon.ico" :type "image/x-icon") (:title "Hunchentoot test menu")) (:body (:h2 (str *headline*))
@@ -544,6 +545,11 @@ (make-pathname :name "fz" :type "jpg" :version nil :defaults *this-file*) "image/jpeg")
(create-static-file-dispatcher-and-handler
"/hunchentoot/test/favicon.ico"
(make-pathname :name "favicon" :type "ico" :version nil
:defaults *this-file*)
"image/x-icon") (create-folder-dispatcher-and-handler "/hunchentoot/code/" (make-pathname :name nil :type nil :version nil
Wouldn't that execute the CREATE-STATIC-FILE-DISPATCHER-AND-HANDLER and CREATE-FOLDER-DISPATCHER-AND-HANDLER with every page view? It would probably be better to move them outside the function that builds the html so they only execute once when you startup the server.
I Misread the patch above. At the time it looked like the CREATE-STATIC-FILE-DISPATCHER-AND-HANDLER and CREATE-FOLDER-DISPATCHER-AND-HANDLER calls were inside the WITH-HTML form, which didn't make any sense to me. I didn't see the line:
@@ -544,6 +545,11 @@
separating tht two.
My apologies.
--Jeff