summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http_connection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/http_connection.cpp b/http_connection.cpp
index 0873985..79556e7 100644
--- a/http_connection.cpp
+++ b/http_connection.cpp
@@ -71,7 +71,9 @@ bool HTTP::Connection::parse_request(boost::asio::streambuf& buf) {
qi::rule<Iterator, std::string()> word_p = +(qi::char_ - ' ' - '\r');
- qi::rule<Iterator, std::vector<std::string>()> path_p = '/' >> +(qi::char_ - '/' - '?' - ' ') % '/';
+ qi::rule<Iterator, char()> urlchar_p = (qi::char_ - '%') | ('%' >> qi::uint_parser<char, 16, 2, 2>());
+
+ qi::rule<Iterator, std::vector<std::string>()> path_p = '/' >> +(urlchar_p - '/' - '?' - ' ') % '/';
qi::rule<Iterator, std::pair<std::string, std::string>()> pair_p = +(qi::char_ - '=') >> '=' >> +(qi::char_ - '&' - ' ');
qi::rule<Iterator, std::map<std::string, std::string>()> args_p = '?' >> pair_p >> *('&' >> pair_p);