--> Wednesday, February 18, 2004, 12:11:37 AM, [EMAIL PROTECTED] wrote:On Mon, 2004-02-16 at 12:56, [EMAIL PROTECTED] wrote:Here's the old sourceforge entry. I was reminded of this when reformatting and reinstalling webware. What happens now?
http://sourceforge.net/tracker/ index.php?func=detail&aid=836157&group_id=4866&atid=104866
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 DOCUMENT_ROOT
is the right thing to do. WebKit can't really return the server side path
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 not
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 path
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 doesn't support.
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 | [EMAIL PROTECTED] | http://blog.ianbicking.org
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss