Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix query parsing (work around a rakudobug)

  • Loading branch information...
commit daa908e59fbbdb7f8c899fdba24b5fe5d9bfa904 1 parent 4d9abe4
@moritz moritz authored
Showing with 3 additions and 2 deletions.
  1. +3 −1 lib/IETF/RFC_Grammar/URI.pm
  2. +0 −1  t/rfc-3986-examples.t
View
4 lib/IETF/RFC_Grammar/URI.pm
@@ -23,7 +23,9 @@ grammar IETF::RFC_Grammar::URI is IETF::RFC_Grammar::IPv6 {
};
token URI {
- <scheme> ':' <hier_part> [ '?' <query> ]? [ '#' <fragment> ]?
+ # should be [ '?' <query> ]?
+ # but that triggers a rakudobug (RT #112148)
+ <scheme> ':' <hier_part> [ '?' <query> | <?> ] <?before .?> [ '#' <fragment> ]?
};
token hier_part {
View
1  t/rfc-3986-examples.t
@@ -17,7 +17,6 @@ $u.parse('ldap://[2001:db8::7]/c=GB?objectClass?one');
is($u.scheme, 'ldap', 'ldap scheme');
is($u.host, '[2001:db8::7]', 'ldap host');
is($u.path, '/c=GB', 'ldap path');
-todo('LDAP query');
is($u.query, 'objectClass?one', 'ldap query');
$u.parse('mailto:John.Doe@example.com');
Please sign in to comment.
Something went wrong with that request. Please try again.