[hunchentoot-devel] Problems with create-folder-dispatcher-and-handler
Edi Weitz
edi at agharta.de
Thu Dec 7 07:49:27 UTC 2006
On Wed, 6 Dec 2006 22:24:39 +0100, "Rafał Strzaliński" <nablaone at 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.
More information about the Tbnl-devel
mailing list