Commit 8f54005a authored by Dominik Charousset's avatar Dominik Charousset

Fix parsing of the path component in URIs

parent a20f692d
......@@ -127,7 +127,7 @@ void read_uri(State& ps, Consumer&& consumer) {
};
// Allowed character sets.
auto path_char = [](char c) {
return in_whitelist(alphanumeric_chars, c) || c == '/';
return uri_unprotected_char(c) || c == '/';
};
// Utility setters for avoiding code duplication.
auto set_path = [&] {
......
......@@ -288,6 +288,7 @@ CAF_TEST(builder construction) {
CAF_TEST(from string) {
// all combinations of components
ROUNDTRIP("http:file");
ROUNDTRIP("http:foo-bar");
ROUNDTRIP("http:file?a=1&b=2");
ROUNDTRIP("http:file#42");
ROUNDTRIP("http:file?a=1&b=2#42");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment