Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1555de

Browse files
author
ky
committed
fix uri decoding and query string parsing
1 parente1aad6e commitb1555de

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎include/network/uri/accessors.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ struct key_value_sequence
3232
{
3333
query = pair >> *((boost::spirit::qi::lit(';') |'&') >> pair);
3434
pair = key >> -('=' >> value);
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/%");
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/%\\-_~\\.+");
3737
}
3838

3939
boost::spirit::qi::rule<uri::const_iterator, Map()> query;

‎include/network/uri/decode.hpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ OutputIterator decode(const InputIterator &in_begin,
7474
*out++ =0x10 * v0 + v1;
7575
}
7676
else
77+
if (*it =='+')
78+
{
79+
*out++ ='';
80+
++ it;
81+
}
82+
else
7783
{
7884
*out++ = *it++;
7985
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp