mirror of https://github.com/omar-polo/gmid.git
bugfix: allow @ and : in paths
gmid would disallow the '@' and ':' characters in paths (unless percent-encoded.) Issue reported by freezr.
This commit is contained in:
parent
df9b379081
commit
5e41063f1b
2
iri.c
2
iri.c
|
@ -352,6 +352,8 @@ parse_path(struct parser *p)
|
|||
|
||||
while (unreserved(*p->iri)
|
||||
|| sub_delimiters(*p->iri)
|
||||
|| *p->iri == '@'
|
||||
|| *p->iri == ':'
|
||||
|| *p->iri == '/'
|
||||
|| parse_pct_encoded(p)
|
||||
|| valid_multibyte_utf8(p))
|
||||
|
|
|
@ -198,6 +198,10 @@ main(void)
|
|||
PASS,
|
||||
IRI("http", "a", "", "", "", ""),
|
||||
"avoid infinite loops (see v1.6.1)");
|
||||
TEST("gemini://example.com/@f:b!(z$&)/baz",
|
||||
PASS,
|
||||
IRI("gemini", "example.com", "", "@f:b!(z$&)/baz", "", ""),
|
||||
"allow @, :, !, (), $ and & in paths");
|
||||
|
||||
/* query */
|
||||
TEST("foo://example.com/foo/?gne",
|
||||
|
|
Loading…
Reference in New Issue