https://bugs.kde.org/show_bug.cgi?id=451018

André Werlang <bepp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bepp...@gmail.com

--- Comment #7 from André Werlang <bepp...@gmail.com> ---
A simple experiment demonstrates how xdg-open works:

[code]
$ xdg-mime query default x-scheme-handler/mock
mock.desktop
$ cat .local/share/applications/mock.desktop
[Desktop Entry]
Name=Mock URI Handler
Exec=echo %u >> ~/mockfile
Type=Application
MimeType=x-scheme-handler/mock
$ xdg-open mock://SLACKISBUGGY
$ xdg-open mock:/SLACKISBUGGY
$ xdg-open mock:SLACKISBUGGY
$ cat mockfile
mock://slackisbuggy
mock:/SLACKISBUGGY
mock:SLACKISBUGGY
[/code]

RFC 3986 defines whats between "//" and "/" as an authority (*The host
subcomponent is case-insensitive. The presence of a host subcomponent within a
URI does not imply that the scheme requires access to the given host on the
Internet.* and *Although host is case-insensitive, producers and normalizers
should use lowercase for registered names and hexadecimal addresses for the
sake of uniformity, while only using uppercase letters for
percent-encodings.*).

As such, Slack, as a consumer of an URI needs to handle the host part of the
authority component case-insensitive. Or opt into other URI forms that don't
rely on authority component e.g. "slack:" or "slack:/".

Also, notice the verbiage used (normalizers SHOULD use lowercase). If QUrl did
not lowercase hostnames, that wouldn't make QUrl less conformant to the RFC as
the final consumer should be guaranteeing that.

TLDR; Slack is clearly non-complaint to URI RFC, QUrl doesn't need to be so
strict and is it even necessary to rely on QUrl to figure out the scheme
handler?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to