File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ struct key_value_sequence
32
32
{
33
33
query = pair >> *((boost::spirit::qi::lit (' ;' ) | ' &' ) >> pair);
34
34
pair = key >> -(' =' >> value);
35
- key = spirit::qi::char_ (" a-zA-Z_" ) >> *spirit::qi::char_ (" -+.~a-zA-Z_0-9/%" );
36
- value = *spirit::qi::char_ (" -+.~a-zA-Z_0-9/%" );
35
+ key = boost:: spirit::qi::char_ (" a-zA-Z_" ) >> *boost:: spirit::qi::char_ (" -+.~a-zA-Z_0-9/%" );
36
+ value = *boost:: spirit::qi::char_ (" -+.~a-zA-Z_0-9/%" );
37
37
}
38
38
39
39
boost::spirit::qi::rule<uri::const_iterator, Map()> query;
Original file line number Diff line number Diff line change @@ -691,3 +691,17 @@ BOOST_AUTO_TEST_CASE(uri_unordered_set_test) {
691
691
BOOST_REQUIRE (!uri_set.empty ());
692
692
BOOST_CHECK_EQUAL ((*uri_set.begin ()), network::uri (" http://www.example.com/" ));
693
693
}
694
+
695
+ BOOST_AUTO_TEST_CASE (issue_161_test) {
696
+ network::uri instance (" http://www.example.com/path?param1=-¶m2=some+plus+encoded+text¶m3=~" );
697
+ BOOST_REQUIRE (network::valid (instance));
698
+
699
+ std::map<std::string, std::string> queries;
700
+ network::query_map (instance, queries);
701
+ BOOST_REQUIRE_EQUAL (queries.size (), std::size_t (3 ));
702
+ BOOST_CHECK_EQUAL (queries[" param1" ], " -" );
703
+ BOOST_CHECK_EQUAL (queries[" param2" ], " some+plus+encoded+text" );
704
+ BOOST_CHECK_EQUAL (queries[" param3" ], " ~" );
705
+ BOOST_CHECK_EQUAL (network::decoded (queries[" param2" ]), " some plus encoded text" );
706
+ }
707
+
You can’t perform that action at this time.
0 commit comments