I agree. We should have a task to create a general URL parse/merge
utility. I think we have the beginnings of it already, but it needs
to be teased apart. If I am not mistaken, in this case Max is trying
to create the base URL that will be used as the default for missing
bits when the general URL parser is invoked, so there is a little bit
of chicken/egg problem. But I think we could solve that with some
remodularization. We want a Java-like facility where you can parse
an URL and supply a second URL as the one to take defaults from.
On 2007-04-09, at 23:49 EDT, Jim Grandy wrote:
(Late pile on; my apologies.)
In my experience, you always lose in the end if you try to pick
apart a URL without using a general URL parsing routine. You are
just engineering bugs unless you write comprehensive unit tests
every time you manually pick apart of URL, and what would be the
sense of that?
jim
On Apr 3, 2007, at 7:11 AM, P T Withington wrote:
Mr. Pedantic sez:
if (slash == 0 || (colon > 0 && (slash == -1 || colon < slash)) {
But wait, then there is:
http:foo
which is a relative url with an explicit scheme. Shouldn't that
also prepend the load directory? It seems you really have to
parse the url and then decide whether the path of that url is
relative or not. Don't we already have an url parser utility?
On 2007-04-03, at 09:42 EDT, Max Carlson wrote:
Change 20070403-maxcarlson-s by [EMAIL PROTECTED] on
2007-04-03 06:40:38 PDT
in /Users/maxcarlson/openlaszlo/legals-clean
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Fix DHTML proxied loads in DHTML for apps loaded from
urls beginning with any protocol
New Features:
Bugs Fixed:
Technical Reviewer: promanik
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzBrowser.js - Leave urls beginning with slash or with a
colon before the slash alone, 'specially for Mr. Pedantic :)
Tests:
Files:
M WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070403-
maxcarlson-s.tar