Question about KUrl::equals/cmp...

Maksim Orlovich mo85 at cornell.edu
Thu Nov 5 18:39:47 GMT 2009


> I'm a bit surprised that this comes up only now. What do you need this
> comparison for, and how is the same problem handled in the current
> khtml/konq
> code? (explicit check for empty path (on http) and making it "/", iirc,
> somewhere?)

As Dawit mentioned, KHTML uses urlcmp. The use there is basically to
determine whether a jumped to URL is an anchor jump in the same page or
request to load an another one. Actually, I found the behavior wrt to the
/ different between Firefox and IE.

Though, I do recall seeing a bug report about a website where
http://foo/bar and http://foo/bar/ were different, and we screwed up
because we assumed they were the same. As such, I think the
KUrl::CompareWithoutTrailingSlash in Dawit's patch is incorrect.

... And that would be bug 166389 and
http://lists.kde.org/?l=kde-commits&m=122124631601890&w=2

http://lists.kde.org/?l=kde-commits&m=121498845711981&w=2 also seems
relevant to this discussion.

-Maks






More information about the kde-core-devel mailing list