Bug in KURL handling(?)

David Faure faure at kde.org
Tue Dec 14 20:39:56 GMT 2004


On Tuesday 14 December 2004 21:31, Ingo Klöcker wrote:
> On Tuesday 14 December 2004 21:02, David Faure wrote:
> > On Tuesday 14 December 2004 20:58, Ingo Klöcker wrote:
> > > It's a problem with StripFileProtocol. The leading "file://" must
> > > only be stripped off if the URL contains only a path. A file URL
> > > which has a reference must not be stripped. Otherwise browsing
> > > locally stored docs like KDE's API documentation doesn't work
> > > anymore because the file
> > > /home/ingo/cvs/kde/3.3/compiled/apidocs/kdecore/html/classKURL.html
> > >#_details doesn't exist. Doh!
> >
> > ? I fixed that already when I fixed the shorturi filter. Don't you
> > guys forget that what you type in konq's location bar doesn't go
> > directly to KURL, it goes through the kurifilters first. I don't know
> > yet which bug Andras is seeing though, but browsing API docs
> > definitely works.
> 
> The bug Andras is seeing is that if you click on the Go button next to 
> the location bar while a stripped file URL with reference, e.g. A#B, is 
> displayed the user will get an error because now Konqueror is looking 
> for a file called A#B. This will be perceived by the user as a bug in 
> Konqueror.

I cannot reproduce this bug. Do you both have an up-to-date kdebase/kcontrol/ebrowsing/plugins?

> IMNSHO "file://" should not be removed from URLs which have a reference. 
> Why? Because removing "file://" from URLs with references changes the 
> semantics of the URL. The location bar suggests that a file called A#B 
> is displayed which is plainly wrong. My proposed patch fixes this 
> problem by not removing "file://" from URLs which have a reference.

I'm not objecting to the patch; I just want to point out that it's not strictly necessary
in konqueror's case, since the shorturifilter looks for classKURL.html when
the above URL is given, and if a path contains a real # it is turned into %23.
Normal, since it's a "URL without file protocol" and NOT a path.

-- 
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