Version: (using KDE 4.0.2) Installed from: SuSE RPMs When I open an URL with uppercase letters via KRunner, it will convert the whole URL to lowercase. As there are servers which handle URLs case sensitively, this will lead to errors. Opening an URL with uppercase letters in Konqueror works ok, by the way. So this is a KRunner specific behaviour.
Quit interesting case. The code in question is in http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/runners/locations/locationrunner.cpp?view=markup void processUrl(KUrl &url, const QString &term) { if (url.protocol().isEmpty()) { int idx = term.indexOf('/'); url.clear(); url.setProtocol("http"); url.setHost(term.left(idx)); if (idx != -1) { url.setPath(term.mid(idx)); } } } Here the testcases; KUrl u1("www.Abc.de"); kDebug()<<u1.url(); //"www.Abc.de" u1.setProtocol("http"); kDebug()<<u1.url(); //"http://www.abc.de" KUrl u2; u2.setProtocol("http"); u2.setHost("www.Abc.de"); kDebug()<<u2.url(); //"http://www.abc.de" KUrl u3; u3.setScheme("http"); u3.setHost("www.Abc.de"); kDebug()<<u3.url(); //"http://www.abc.de" The case; iirc a few yearsago we had a discussion if the hostname is really always lowercased. While iirc the w3c-spec says yes, this is false cause there are quit some protocols like donkey and magnet that use the hostname for a filename-reference and therefore _need_ to be case-sensitive. That time somehow we came to the conclusion that KUrl isn't only about url's as the RFC define them and therefore KUrl got patched to be able to deal with the hostname in a case-sensitive way by Petter E. Stokke. Now the situation is, that we adopted QUrl, our code got removed and we are again case-insensitive :-/ The result; I've no idea there and iirc the patch by Petter was rather big and not easy to understand :-(
eh, a small typo went in. The first testcase should be; KUrl u1("www.Abc.de"); kDebug()<<u1.url(); //"www.Abc.de" u1.setProtocol("http"); kDebug()<<u1.url(); //"http:www.Abc.de" (so, without "//" but uppercased)
Doesn't that mean that konqueror uses something different than KURL/QUrl? As I wrote in the report when I enter the address in konqueror directly, it works case sensitively as expected.
It does for you? Well, with current trunk if I put "www.Abc.de" in, Konqueror changes it to "http://www.abc.de".
change product from krunner to kdelibs since it's a KUrl/QUrl related thing rather then KRunner.
re-thinking about comment #3 and comment #4 ; afair there went quit some patches and more unittests in for KUrl in trunk. So, it may possible that a bug was fixed in trunk to let both behave the same now.
SVN commit 784049 by dfaure: The hostname becomes lowercase indeed, both in stable and trunk, and both with http and with other protocols. Just like in kde3. CCBUG: 159017 M +17 -0 kurltest.cpp M +1 -0 kurltest.h WebSVN link: http://websvn.kde.org/?view=rev&revision=784049
I think there's some confusion in this report. Christian is talking about krunner bug which would convert the _whole_ URL to lowercase, while Sebastian (and my kurl unit tests) are about the hostname being converted to lowercase. So let's go back to the original issue: if I type http://www.ABC.de/FR in krunner then I get http://www.abc.de/fr in konqueror. And that's not a KUrl issue.
SVN commit 784052 by dfaure: only the hostname becomes lowercase, not the path. CCBUG: 159017 M +4 -2 kurltest.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=784052
SVN commit 784055 by dfaure: not all urls and paths are lowercase BUG: 159017 M +1 -1 locationrunner.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=784055
re kurltest; the protocol is named "ed2k" rather then "donkey" (sorry for that confusion, but the test wouldn't work anyway since it needs KMLDonkey to be installed). just for the records since imho as long as nobody does complain... (I don't plan to port the KMLDonkey kio-slave to KDE4 anyway ;) * in 2003 the thread at kde-devel that was dealing with that issue was http://66.92.20.25/?t=105978281800002&r=1&w=2 * the bugreport was bug #62425
On Monday 10 March 2008, Sebastian Sauer wrote: > the protocol is named "ed2k" rather then "donkey" (sorry for that confusion, but the test wouldn't work anyway since it needs KMLDonkey to be installed The test would work in all cases; this is a KUrl test, it does not depend on what software you have installed.
hmmmm, then I got probably really something totaly wrong. The KDE3 KUrl solution did use those [Protocol] desktop-files and evaluated there the URIMode to differ between URL and raw mode. But the testcases all test only the URL mode. So, with URL-mode; KUrl("ed2k:/SomeString/OtherString") => "ed2k:/somestring/OtherString" With RAW-mode; KUrl("ed2k:/SomeString/OtherString") => "ed2k:/SomeString/OtherString" ed2k (aka donkey), magnet and sig2dat are all raw-mode aka URIMode=rawuri http://websvn.kde.org/branches/extragear/kde3/network/kmldonkey/scripts/ed2k.protocol?view=markup http://websvn.kde.org/branches/extragear/kde3/network/kmldonkey/scripts/magnet.protocol?view=markup http://websvn.kde.org/branches/extragear/kde3/network/kmldonkey/scripts/sig2dat.protocol?view=markup
eh, again a small fix (an additional "/" since SomeString is the hostname); URL; KUrl("ed2k://SomeString/OtherString") => "ed2k://somestring/OtherString" RAW; KUrl("ed2k://SomeString/OtherString") => "ed2k://SomeString/OtherString"
You're right, KDE3's KURL used those protocol files. But I considered this a nasty hack (it also led to awful dependencies). A better solution has to be found in QUrl (and not discussed in this unrelated bug report). Please reopen 62425 or open a new one, and include thiago in the discussion.