Skip to content

Commit

Permalink
Update uri.cpp
Browse files Browse the repository at this point in the history
fix Corvusoft#384 bug
please accept thank you.
  • Loading branch information
zzl-010 authored Jul 1, 2019
1 parent 2e0cb72 commit c861406
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion source/corvusoft/restbed/uri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,16 @@ namespace restbed
string Uri::decode( const string& value )
{
string result = String::empty;
string valuedecode = String::empty;

string valuedecode = url_encode(value);
if((value.find("%") == string::npos) || (value.find(" ") == string::npos))
{
valuedecode = url_encode(value);
}
else
{
valuedecode = value;
}
for ( string::size_type index = 0; index not_eq valuedecode.length( ); index++ )
{
if ( valuedecode[ index ] == '%' )
Expand Down

0 comments on commit c861406

Please sign in to comment.