! 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 !
PATCH: fix broken handling of URIs
Status:
RESOLVED: FIXED

Comments

Description Felipe Contreras 2013-05-19 06:13:54 CEST
Created attachment 5040 
string: fix exo_str_looks_like_an_uri()

Commit d11199b (Check if uris also contain a slash (bug #9244)) tried to
fix a hang in thunar by properly recognizing that 'http:' is not an URI,
however, while doing so, it broke proper URIs like 'magnet:foo'.

As the RFC clearly states:

   The following are two example URIs and their component parts:

         foo://example.com:8042/over/there?name=ferret#nose
         \_/   \______________/\_________/ \_________/ \__/
          |           |            |            |        |
       scheme     authority       path        query   fragment
          |   _____________________|__
         / \ /                        \
         urn:example:animal:ferret:nose

But even with this succinct example exo_str_looks_like_an_uri() fails.

There is an easy solution; fail only when component part is missing
('urn:'), but succeed otherwise.

This solution fixes 'magnet:foo', and doesn't break the current
expectation from thunar that 'http:' should fail, having the best of
both worlds.

[1] http://www.ietf.org/rfc/rfc3986.txt

See bugs:
https://bugzilla.xfce.org/show_bug.cgi?id=9597
https://bugzilla.xfce.org/show_bug.cgi?id=9647
https://bugzilla.xfce.org/show_bug.cgi?id=9244
Comment 1 Nick Schermer editbugs 2013-05-19 14:46:26 CEST
Applied in 05848bb.
Comment 2 Nick Schermer editbugs 2013-05-19 14:47:49 CEST
*** Bug 9597 has been marked as a duplicate of this bug. ***

Bug #10098

Reported by:
Felipe Contreras
Reported on: 2013-05-19
Last modified on: 2013-05-19
Duplicates (1):
  • 9597 exo-open fails to recognize magnet links

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
unspecified

Attachments

string: fix exo_str_looks_like_an_uri() (1.81 KB, patch)
2013-05-19 06:13 CEST , Felipe Contreras
no flags

Additional information