Matthew Bevan wrote: > In my logs, I see that in my production code behind an Apache > mod_rewrite proxy, the following request is being made: > > 127.0.0.1 - - "POST /administration/organization/3/edit HTTP/1.1" 302 > 177 "http://www.DOMAIN.tld/tgroot/administration/organization/3/edit" > "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/ > 20060911 Camino/1.0.3" > > The DOMAIN.tld version is correct, the POST version is not, and > relative redirects (to, say, './' or '../') drop the approot/ > base_url. This is most likely a CherryPy problem, but it makes using > relative paths for flexibility and webpath/base_url_filter is > pointless if redirects refuse to work. The cherrypy.HTTPRedirect > exception is not cherrypy.request.app_root/base_url aware. > > Specifically, line 81 of _cperror.py in CherryPy states: > > url = urlparse.urljoin(cherrypy.request.browser_url, url) > > Should this not use cherrypy.request.app_root somewhere? Or should > TG fudge browser_url to be the "correct" version, as the DOMAIN.tld > version in the above log.
browser_url is generated from request.base, which should include your app root. If it does not, use baseurlfilter to correct request.base. What version of TG/CP are you using? To my knowledge, there's never been a "request.app_root" in CherryPy, so it's hard to tell exactly what you're saying. A small, complete test case or demo would help immensely. > I look forward to hearing that this is fixed! (As this is a bit of a > breaker for my administration area. ;^) This has been fixed (and made much simpler) in CherryPy 3 via tools.proxy and cherrypy.url. There aren't any fixes planned for the 2.x line in this area; you need to work around it either with some TG facility (tg.url?) or pass an absolute path to HTTPRedirect. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

