diff --git a/include/boost/url/rfc/impl/query_rule.ipp b/include/boost/url/rfc/impl/query_rule.ipp index 93982ad7..4aaf2d06 100644 --- a/include/boost/url/rfc/impl/query_rule.ipp +++ b/include/boost/url/rfc/impl/query_rule.ipp @@ -27,7 +27,7 @@ struct query_rule::key_chars key_chars() noexcept : grammar::lut_chars( pchars - + '/' + '?' + + '/' + '?' + '[' + ']' - '&' - '=') { } diff --git a/test/unit/rfc/query_rule.cpp b/test/unit/rfc/query_rule.cpp index 8834dce1..8f1546cc 100644 --- a/test/unit/rfc/query_rule.cpp +++ b/test/unit/rfc/query_rule.cpp @@ -82,15 +82,10 @@ public: good("x=y&"); good("x=y&a"); good("x=y&a=b&"); + good("keys[]=value1&keys[]=value2"); // some gen-delims - for(auto c : - "#[]" - ) - { - string_view s( &c, 1 ); - bad(s); - } + bad("#"); // pchar / "/" / "?" good(