Following up to my previous post on this topic from August
([EMAIL PROTECTED]) I just wanted to have your
opinion on the the issue again, which I investigated a bit further:
Please try out the small psp I attached to this message. For me, it generates
the following output:
Request:
Host: www.myadress.net
Adapter: /mydir/test.psp
urlPath: /opt/www/mydir/test.psp
serverURL: www.myadress.net/mydir/test.psp/opt/www/mydir/test.psp
In my optinion there is something clearly wrong with the last one of these
lines, because this is the function (from todays CVS HTTPRequest.py):
def serverURL(self):
""" Returns the full internet path to this request, without any extra
path info or query strings.
ie: www.my.own.host.com/WebKit/TestPage.py"""
host = self._environ['HTTP_HOST']
adapter = self.adapterName()
path = self.urlPath()
return host+adapter+path
To me it looks like the last line should read:
return host+adapter
What do you think?
Ah - and, by the way: Try to uncomment the first line in test.psp
Request: <%#=self.request().rawRequest()%><BR>
^
And you will get an exception because request().rawRequest() refers to
a nonexistent attribute in the request object. This function should either be
removed or raise a NotImplemented exception.
Regards,
Fionn
<%@ page extends="WebKit.Page"%>
<%@ page method="writeHTML"%><%@ page isInstanceSafe="yes" %>
<html>
<body>
<pre>
Request: <%#=self.request().rawRequest()%><BR>
Host: <%=self.request()._environ['HTTP_HOST']%><BR>
Adapter: <%=self.request().adapterName()%><BR>
urlPath: <%=self.request().urlPath()%><BR>
serverURL: <%=self.request().serverURL()%><BR>
</pre>
</body>
</html>