2
0
mirror of https://github.com/boostorg/url.git synced 2026-01-19 04:42:15 +00:00

handle brackets in key_chars

This commit is contained in:
alandefreitas
2022-02-14 20:48:12 -03:00
parent 3cdcef3382
commit 1317ca8cd7
2 changed files with 3 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ struct query_rule::key_chars
key_chars() noexcept
: grammar::lut_chars(
pchars
+ '/' + '?'
+ '/' + '?' + '[' + ']'
- '&' - '=')
{
}

View File

@@ -82,15 +82,10 @@ public:
good<T>("x=y&");
good<T>("x=y&a");
good<T>("x=y&a=b&");
good<T>("keys[]=value1&keys[]=value2");
// some gen-delims
for(auto c :
"#[]"
)
{
string_view s( &c, 1 );
bad<T>(s);
}
bad<T>("#");
// pchar / "/" / "?"
good<T>(