[hunchentoot-devel] Problems with create-folder-dispatcher-and-handler

Hi, I've tried to serve files from 'public' directory under '/' base URL: (hunchentoot::create-folder-dispatcher-and-handler "/" #p"public/") and always got 403 HTTP error. When I've changed base url to for example '/public/' everything works fine. I've tried to fix it, but i'm don't understand pathnames well :-( Any ideas? IMHO (with-chroot (directory) ...) would be an ideal solution :-) Environment: SBCL 1.0 Debian Etch Hunchentoot 0.4.10 -- Best regards, Rafal Strzalinski (nabla) http://rafal.strzalinski.pl

On Wed, 6 Dec 2006 22:24:39 +0100, "Rafał Strzaliński" <nablaone@gmail.com> wrote:
I've tried to serve files from 'public' directory under '/' base URL:
(hunchentoot::create-folder-dispatcher-and-handler "/" #p"public/")
Why the double colon?
and always got 403 HTTP error.
When I've changed base url to for example '/public/' everything works fine.
I've tried to fix it, but i'm don't understand pathnames well :-(
Any ideas?
I just tried with LispWorks and it works fine for me. What happens if you use an absolute pathname instead of #p"public/"? Note that the documentation says that a file relative to BASE-PATH is emitted, specifically, if you look at the source code, MERGE-PATHNAMES is used. MERGE-PATHNAMES is called in the handler's thread and I think it's implementation-specific what happens if you use a relative pathname here. So, don't do it...
IMHO (with-chroot (directory) ...) would be an ideal solution :-)
Huh? Cheers, Edi.
participants (2)
-
Edi Weitz
-
Rafał Strzaliński