[Bese-devel] Araneida backends and regexp-entry-point
Maciek Pasternacki
maciekp at japhy.fnord.org
Sun Nov 27 02:51:46 UTC 2005
With Araneida backend and current ucw_dev example application won't
run; it is because backend registers regexp entry points as URLs for
araneida, so they aren't handled at all (Araneida passes only requests
which url literally matches regexp string, and this url isn't handled
by UCW). I added handler for regexp-entry-point that registers for
whole whole URL up to beginning of the regexp; it's a kludge that
conflicts with other entry points of the same URL but it makes example
app work -- only static files conflict. It seems that at least some
apps will be able to work with this method.
,----
| <japhy at lizard:pts/2 ucw_dev> 1086$ darcs whatsnew
| hunk ./src/backend/araneida.lisp 78
| +(defmethod register-url-handler ((backend araneida-backend) (entry-point regexp-entry-point)
| + handler)
| + (ucw.backend.dribble "Registering regexp handler ~S at url ~S." handler (entry-point.url entry-point))
| + (araneida:install-handler
| + (araneida:http-listener-handler (listener backend))
| + (make-instance 'ucw-handler :handler handler)
| + (araneida:urlstring
| + (araneida:merge-url (default-url backend)
| + (application.url-prefix
| + (entry-point.application entry-point))))
| + nil))
| }
| <japhy at lizard:pts/2 ucw_dev> 1087$
`----
The question is, how to complete this patch?
a) Leave everything as it is; examples app won't work, but it's
predictable.
b) Add new method, don't change anything more; examples app will work
but will go into debugger when asked about static pages
(favicon.ico, stylesheet.css, any nonexistent file).
c) Move wwwroot to /static url; favicon.ico will stop working (or we
can define entry point in favicon.ico that will be example of
redirect-component and/or custom content-type).
d) Keep static files in root, move examples to /examples, maybe add
some static index.html.
e) (Optimal, but needs time) Patch araneida to allow multiple handlers
for the same url prefix, each of which would have a predicate
attached that would decide if this handler applies or not; first
matching handler on list is used.
I'd personally go (c) for now (with favicon.ico redirecting to
/static) and, when time permits, (e); but before I finish patch I'd
like to hear what would be considered good default behaviour.
--
__ Maciek Pasternacki <maciekp at japhy.fnord.org> [ http://japhy.fnord.org/ ]
`| _ |_\ / { (2a) No matter how hard you try, you can't make a baby in much
,|{-}|}| }\/less then 9 months;trying to speed this up *might* make it slower,
\/ |____/ but it won't make it happen any quicker. } ( RFC 1925 ) -><-
More information about the bese-devel
mailing list