On Feb 21, 2004, at 7:14 PM, webware-discuss@... wrote:
> --> Wednesday, February 18, 2004, 12:11:37 AM, jason@...
>> On Mon, 2004-02-16 at 12:56, webware-discuss@... wrote:
>>> Here's the old sourceforge entry. I was reminded of this when
>>> reformatting and reinstalling webware. What happens now?
>> I took a look at the code and your modified version. With regard to
>> handling absolute URLs, I guess I'm not convinced that using
>> is the right thing to do. WebKit can't really return the server side
>> of an absolute URL, since that URL may not even be handled by WebKit
>> it all depends on your adapter and webserver configuration. And it's
>> even possible for WebKit to determine whether it will handle the URL
>> or not,
>> so returning any path at all seems to be hopelessly misleading.
>> The only thing that WebKit can reliably do is produce a server side
>> relative to the request (this is taken right from the docstring of the
>> method in question). I think the right thing to do may be to disallow
>> absolute paths by raising an exception.
> Well, the code works, and the functionality exists everywhere else. If
> this simple functionality never makes it into Webware, I will not use
> it. I cannot use a web platform which does not know where its root is.
DOCUMENT_ROOT can't reliably be used to find a file for a URL. There
are many possible configurations that can effect URL-to-file mappings,
and DOCUMENT_ROOT will not indicate any of those. Perhaps this works
for your Apache configuration, but for many people it won't work. If
it uses DOCUMENT_ROOT it doesn't even make sense for most Webware
configurations, only for configurations that use psp-handler -- other
configurations involve the kind of URL mappings that this specifically
As a compromise, I might suggest that the methods be refactored so you
can more easily override a single method to do what you want without
having to muck with other stuff. Your patch could even be dynamically
applied in your context's __init__.py
Ian Bicking | ianb@... | http://blog.ianbicking.org