From 3a4010028fc7d310c841c3d96d69008ce7d6c288 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 2 Jan 2011 13:41:29 +0100 Subject: Urldecode path. --- http_connection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'http_connection.cpp') 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 word_p = +(qi::char_ - ' ' - '\r'); - qi::rule()> path_p = '/' >> +(qi::char_ - '/' - '?' - ' ') % '/'; + qi::rule urlchar_p = (qi::char_ - '%') | ('%' >> qi::uint_parser()); + + qi::rule()> path_p = '/' >> +(urlchar_p - '/' - '?' - ' ') % '/'; qi::rule()> pair_p = +(qi::char_ - '=') >> '=' >> +(qi::char_ - '&' - ' '); qi::rule()> args_p = '?' >> pair_p >> *('&' >> pair_p); -- cgit v1.2.3