[Zope] SiteRoot and URL1 cause different namespace error
Dieter Maurer
dieter@handshake.de
Fri, 12 Apr 2002 21:42:17 +0200
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