On Nov 2, 9:17 am, Chris McDonough <chr...@plope.com> wrote:
> repoze.bfg 1.1b1 has been released.
> - If a BFG app that had a route matching the root URL was mounted
> under a path in modwsgi, ala ``WSGIScriptAlias /myapp
> /Users/chrism/projects/modwsgi/env/bfg.wsgi``, the home route (a
> route with the path of ``'/'`` or ``''``) would not match when the
> path ``/myapp`` was visited (only when the path ``/myapp/`` was
> visited). This is now fixed: if the urldispatch root factory notes
> that the PATH_INFO is empty, it converts it to a single slash before
> trying to do matching.
Hmmm, not sure if that sounds right. Internally adding in a slash like
that can possibly stuff up relative URLs generated in that page in as
much as browser will interpret them incorrectly.
For example, if browser requested '/myapp' and that page had relative
URL 'page.html' where you expected browser to interpret that as '/
myapp/page.html', you will be disappointed as browser will instead
interpret it as '/page.html'.
Normally one would send a redirect back to the browser to tell it to
request again with the trailing slash added. This way the browser is
aware of the correct base URL and so relative URLs in the response
will work properly.
That said, I know nothing about how your stuff works, so what I say
may not be relevant in your system.
Repoze-dev mailing list