[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Question about KUrl::equals/cmp...
From:       David Faure <faure () kde ! org>
Date:       2009-11-04 15:34:25
Message-ID: 200911041634.26126.faure () kde ! org
[Download RAW message or body]

On Wednesday 04 November 2009, Dawit A. wrote:
> Is there a reason why KUrl::equals with its second parameter set to
> KUrl::CompareWithoutTrailingSlash or KUrl::cmp's second parameter set to
>  true returns "http://www.kde.org/" and "http://www.kde.org" are not equal
>  to each other ?
 
Ah, I think I know. Tricky: with http these urls are equal, while with e.g. 
FTP they are not, since ftp://user@host redirects to ftp://user@host/home/user
(on a linux server), while ftp://user@host/ is the root dir.
Basically we treat "no path" as "please go to the default starting directory".
But I'm ok with an exception for HTTP, where indeed people expect these
two urls to be the same.
Please add a unit test if you fix it.

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic