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:
Created attachment 5040 looks_like_ an_uri( )
string: fix exo_str_
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:
\_/ \______
| | | | |
scheme authority path query fragment
| _______
/ \ / \
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: /bugzilla. xfce.org/ show_bug. cgi?id= 9597 /bugzilla. xfce.org/ show_bug. cgi?id= 9647 /bugzilla. xfce.org/ show_bug. cgi?id= 9244
https:/
https:/
https:/