[FIX] urlWithPassword-ls (tests wrong?)
Bert Freudenberg
bert at isg.cs.uni-magdeburg.de
Mon Jul 21 09:40:41 UTC 2003
The test does not look right to me. I have not looked at the original
changeset, maybe it is still correct.
According to the RFC, as soon as a scheme like "ftp:" is in an URL,
this constitutes an absolute location. This means that "ftp:xyz" would
be equivalent to "ftp://xyz/". The problem is that older browsers did
that wrong. It's been corrected for a while, though, in Mozilla at
least.
From http://www.faqs.org/rfcs/rfc2396.html
"<scheme>:<scheme-specific-part>
An absolute URI contains the name of the scheme being used (<scheme>)
followed by a colon (":") and then a string (the <scheme-specific-
part>) whose interpretation depends on the scheme.
[...]
Relative URI references are distinguished from absolute URI in that
they do not begin with a scheme name. "
Am Montag, 21.07.03 um 11:03 Uhr schrieb marcus at ira.uka.de:
>
> Ok, I added the tests to the baseimage tests package.
> Problem: after filing in your urlWithPassword-ls changeset, I get two
> failing tests:
>
> testRelativeFTP2
>
> baseUrl _ 'ftp://somewhere/some/dir/?query#fragment' asUrl.
> url _ baseUrl newFromRelativeText: 'ftp:xyz'.
>
> self assert: url toText = 'ftp://somewhere/some/dir/xyz'.
>
>
> url toText is 'ftp://somewhere/some/dir//xyz'
>
>
> testRelativeHTTP
>
>
> baseUrl _ 'http://some.where/some/dir?query1#fragment1' asUrl.
> url _ baseUrl newFromRelativeText:
> '../another/dir/?query2#fragment2'.
>
> self assert: url toText =
> 'http://some.where/another/dir/?query2#fragment2'.
>
>
> Url toText is 'http://some.where/some/another/dir/?query2#fragment2'
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> < I'm a bug-fixing machine! >
>
> This post brought to you by the BugFixArchiveViewer, a handy tool that
> makes it easy to comment on proposed fixes and enhancements for Squeak.
> For more information, check out the Web page for the
> BugFixArchiveViewer
> project: http://minnow.cc.gatech.edu/squeak/3214
>
> < I'm a bug-fixing machine! >
>
-- Bert
More information about the Squeak-dev
mailing list
|