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

List:       kde-frameworks-devel
Subject:    Re: kio and scheme://
From:       Milian Wolff <mail () milianw ! de>
Date:       2014-11-02 22:23:55
Message-ID: 3835554.WJ0A3ZWic5 () minime
[Download RAW message or body]

On Sunday 02 November 2014 13:43:50 =C0lex Fiestas wrote:
> Hi there
> =

> There are quite a few places where the following code is found:
> =

> if (!url.path().endsWith('/')) {
>     url.setPath(url.path() + '/');
> }

Unrelated to the below, this will also add a trailing slash to non-empty =

paths, preventing files from getting opened.

> Given an url like: 'scheme://' KUrl will return '/' as path while QUrl
> returns empty string.
> =

> This is making kio add a third slash to the url in many places (because of
> code like the one pasted before).
> =

> As a result if you open dolphin and type smb://, it will be redirected to
> smb:///.

Which is correct, no? An URL protocol is separated by ://. That's also why =
you =

need to type file:///tmp/bla/blub or the like. Missing a slash at the =

beginning will fail in all browsers I tested.

> Is this an intended behavior or should I start sending patches to prevent
> this from happening?
> =

> Also, even though technically the path of 'smb://' is empty, users are us=
ed
> to that format (specially given how popular htp:// is) so I would like to
> keep supporting it.

What does "http://" mean? It's a bad example as http:// is not a path proto=
col =

like smb or file. For these two, it is OK to add the / as default path.

Bye
-- =

Milian Wolff
mail@milianw.de
http://milianw.de
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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