KURL problem
David Faure
faure at kde.org
Tue Sep 27 12:14:54 BST 2005
On Tuesday 27 September 2005 13:01, Andras Mantia wrote:
> On Tuesday 27 September 2005 13:39, Michael Brade wrote:
> > And what happens with your patch in case of ftp://ya\@kde.org//? You
> > don't want to get ftp://ya\@kde.org.
>
> It happens the same as I would get for "ftp://ya\@kde.org/". I doubt
> applications are analyzing the URL before requesting an adjustPath(-1).
> make check fails, but for another case:
> "kurltest: amantia.url() : checking 'http://?.foo' against expected
> value 'http://xn--80a.foo'... KO !"
Heh, it's funny that it should fail for you on a variable named after you, isn't it? :)
Seems to be an IDN problem, can someone who knows about IDN look into this?
> The attached kurltext.cpp addition proves it:
>
> KURL ftpurl1("ftp://ftp.kde.org/");
> ftpurl1.adjustPath(-1);
> KURL ftpurl2("ftp://ftp.kde.org///");
> ftpurl2.adjustPath(-1);
> check("ajdustPath(-1)", ((ftpurl1.url() != ftpurl2.url())?"ko":"ok"),
> "ok");
The check is a bit bad since it would pass whether the resulting path is "" or "/"
for both urls, but OK, I'll commit your patch and add some tests.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list