there is another bug in that prefix middleware in that it's trying to strip out the SCRIPT_NAME prefix, which is wrong because that should already be stripped out by the webserver before forwarding the request (at least apache mod_proxy does). In general anything under a "Location" or "Alias" directive means that it should never be aware of which location it is in, so the location can be easily changed by the web-server configuration. The reason for SCRIPT_NAME is to allow the application to create links to its own pages absolute URLs (e.g starting with /). not to mention that it's faster to do the prefix stripping in the web server.
So right now that middleware will do a second stripping of the SCRIPT_NAME prefix in addition to the stripping by apache, which will cause problems for URLs like /app/app/action On Jan 5, 11:14 am, Ian Bicking <[email protected]> wrote: > Looking at news, this is only in > trunk:http://svn.pythonpaste.org/Paste/Deploy/trunk/docs/news.txt > > Try: easy_install PasteDeploy==dev > > > > Tycon wrote: > > PasteDeploy 1.3.2 > > Paste 1.7.2 > > > According to (non)-easy-install these are the "best" match version, > > and it's "already the active version in easy-install.pth", so > > hopefully that means I have the latest version in "easy- > > install" (=cryptic) speak. > > > On Jan 5, 10:04 am, Ben Bangert <[email protected]> wrote: > >> On Jan 3, 2009, at 12:34 AM, Tycon wrote: > > >>> but the PrefixMiddleWare also doesn't seem to be setting the WSGI > >>> environment url_scheme > >>> (nor request.scheme). The PrefixMiddleware code never looks up > >>> HTTP_X_FORWARDED_PROTO and doesn't set the url scheme in the wsgi > >>> environment. So that needs to be fixed, as well as made clear to > >>> users that they should include it (after it's fixed) if they use a > >>> reverse proxy even without a prefix. > >> Hmm, I was under the impression that the latest PrefixMiddleware in > >> Paste does take that into account. Which version of Paste are you using? > > >> Cheers, > >> Ben > > >> smime.p7s > >> 3KViewDownload > > -- > Ian Bicking : [email protected] :http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
