Question about KUrl::equals/cmp...

Dawit A. adawit at kde.org
Thu Nov 5 19:26:01 GMT 2009


On Thursday 05 November 2009 13:39:47 Maksim Orlovich wrote:
> > 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.

ahhhh... very interesting. I will remove that option from the patch then. It 
is okay to have duplicate items in history list to make sure we avoid 
regressions of bug 166389.

The issue with KUrl however remains because the option name is confusing to 
say the least and that same option produces different results in urlcmp.

Dawit a.




More information about the kde-core-devel mailing list