SiteRoot and URL1 cause different namespace error
Greetings, I'm having a problem resolving URL's running in ZServer mode with a SiteRoot. Some background: httpd.conf contains: ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ ProxyVia on The SiteRoot is: base = https://my.server.com path = / If I create the following DTML method, I get a "Different Namespace" error: URL is: <dtml-var URL1> <p> Content is: <dtml-var "REQUEST.resolve_url(URL1)"> In testing, I have found that I can fix this error by changing the last line to: Content is: <dtml-var "REQUEST.resolve_url('http://' + REQUEST.HTTP_HOST + URLPATH1)"> This isn't a very elegant solution, though. How can I get Zope to properly resolve the URL1 variable? Thanks, Steve
Steven Turoff writes:
I'm having a problem resolving URL's running in ZServer mode with a SiteRoot. Some background:
httpd.conf contains:
ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ ProxyVia on
The SiteRoot is:
base = https://my.server.com path = /
If I create the following DTML method, I get a "Different Namespace" error:
URL is: <dtml-var URL1> <p> Content is: <dtml-var "REQUEST.resolve_url(URL1)">
In testing, I have found that I can fix this error by changing the last line to:
Content is: <dtml-var "REQUEST.resolve_url('http://' + REQUEST.HTTP_HOST + URLPATH1)"> Apparently, "HOST_URL" (or something similar, look at "ZPublisher.HTTPRequest.resolve_url") is not set correctly by the SiteRoot.
Fix it and submit a bug report with patch to the collector <http:Collector.zope.org>. Dieter
participants (2)
-
Dieter Maurer -
Steven Turoff