uri: allow out of spec chars

This commit is contained in:
Danny Robson 2022-02-23 07:26:57 +10:00
parent f4bb73dbec
commit 50b53f7269
2 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,9 @@
sub_delim = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "=";
# double quote is allowed here because it's quite common in real life and
# we don't have a great way to work around it here.
pchar = unreserved | pct_encoded | sub_delim | ':' | '@' | '"';
#
# pchar = unreserved | pct_encoded | sub_delim | ':' | '@' | '"';
pchar = (any - ('%' | '/' | '?' | '#')) | pct_encoded;
## Atoms
reg_name = (unreserved | pct_encoded | sub_delim)*;

View File

@ -357,6 +357,9 @@ test_validity (cruft::TAP::logger &tap)
"http://example.com/???",
"http://example.com/?#?",
"http://example.com/%22",
// Out of spec, but required
"/topic/emmanuel-jean-michel-frédéric-macron-2wc",
};
for (auto const &good: GOOD)