! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo-open fails to recognize magnet links
Status:
RESOLVED: DUPLICATE

Comments

Description moskvax 2012-12-06 08:37:40 CET
The change to exo_string_looks_like_an_uri that fixes  https://bugzilla.xfce.org/show_bug.cgi?id=9244 changes exo-open's behavior with magnet links, which do not have a hierarchical path component and so don't have a "/" coming after the ":". 

Before this commit, exo-open recognizes magnet links as URI's and eventually passes them to gtk_show_uri, which opens whatever is registered for x-scheme-handler/magnet; afterwards it doesn't recognize them and opens up an error dialog. Reverting the commit fixes the problem.

now:

[moskvax@israfel exo-open]$ G_MESSAGES_DEBUG=all ./exo-open 'magnet:?xt=urn:[blah]'
(lt-exo-open:6077): exo-open-DEBUG: opening the following uri: (null)
... (opens "unable to detect the URI-scheme" error dialog)

before:

[moskvax@israfel exo-open]$ G_MESSAGES_DEBUG=all ./exo-open 'magnet:?xt=urn:[blah]'
(lt-exo-open:12710): exo-open-DEBUG: opening the following uri: magnet:?xt=urn:[blah]
(lt-exo-open:12710): exo-open-DEBUG: vfs supported schemes: file, archive, dns-sd, cdda, davs+sd, dav+sd, davs, dav, http, recent, network, localtest, burn, computer, trash, ftp, sftp, ssh
(lt-exo-open:12710): exo-open-DEBUG: nothing worked, try ftp(s) or gtk_show_uri()
... (opens the registered application)
Comment 1 Felipe Contreras 2013-04-08 02:29:05 CEST
Is nobody interested?
Comment 2 Sebastian Mäki 2013-04-13 00:52:57 CEST
I was unable to reproduce the delay that was supposedly fixed by commit d11199b when I reverted the commit. Could we just revert this now since it's actually breaking URI specification. As far as I can tell this current exo_str_looks_like_an_uri check is not in accordance to specifications. Many URI schemes include a hierarchical element for a naming authority. Magnet links by their nature do not have an authority and thus should not contain a component beginning with double slashes and ending in the next single slash.

http://www.w3.org/TR/url/#find-the-scheme
http://tools.ietf.org/html/rfc3986#section-3

please revert commit d11199b
Comment 3 Felipe Contreras 2013-04-13 01:47:47 CEST
(In reply to comment #2)
> I was unable to reproduce the delay that was supposedly fixed by commit
> d11199b when I reverted the commit. Could we just revert this now since it's
> actually breaking URI specification. As far as I can tell this current
> exo_str_looks_like_an_uri check is not in accordance to specifications. Many
> URI schemes include a hierarchical element for a naming authority. Magnet
> links by their nature do not have an authority and thus should not contain a
> component beginning with double slashes and ending in the next single slash.
> 
> http://www.w3.org/TR/url/#find-the-scheme
> http://tools.ietf.org/html/rfc3986#section-3
> 
> please revert commit d11199b

How about this?

return (s[0] == ':' && s[1] != '\0');
Comment 4 Felipe Contreras 2013-05-19 05:18:04 CEST
*** Bug 9647 has been marked as a duplicate of this bug. ***
Comment 5 Felipe Contreras 2013-05-19 05:20:51 CEST
(In reply to comment #3)
> How about this?
> 
> return (s[0] == ':' && s[1] != '\0');

WTF, is nobody interesting in fixing this? The fix is right there, apply it FFS.
Comment 6 Felipe Contreras 2013-05-19 06:15:02 CEST
I've submitted a patch that fixes the issue #10098

While retaining the behavior that fixes bug #d11199b.
Comment 7 Nick Schermer editbugs 2013-05-19 14:47:49 CEST

*** This bug has been marked as a duplicate of bug 10098 ***

Bug #9597

Reported by:
moskvax
Reported on: 2012-12-06
Last modified on: 2013-05-19
Duplicates (1):
  • 9647 exo-open is broken for url schemes

People

Assignee:
Nick Schermer
CC List:
8 users

Version

Version:
0.10.0

Attachments

Additional information