bug fixed in the encoder part of ghttp api
This commit is contained in:
parent
4bc1fce9cf
commit
4e5dd9a184
|
@ -31,7 +31,7 @@ static const std::string UrlEncode(const std::string& s)
|
|||
ret += ptr[i];
|
||||
else if(int(ptr[i])==32)
|
||||
ret += '+';
|
||||
else
|
||||
else if((int(ptr[i])!=10) && (int(ptr[i])!=11) && (int(ptr[i])!=13))
|
||||
{
|
||||
char buf[5];
|
||||
memset(buf,0,5);
|
||||
|
|
|
@ -31,7 +31,7 @@ class GstoreConnector {
|
|||
$ret .= $c;
|
||||
else if (ord($c)==32)
|
||||
$ret .= "+";
|
||||
else
|
||||
else if (ord($c)!=10 and ord($c)!=11 and ord($c)!=13)
|
||||
$ret .= sprintf("%%%X", ord($c));
|
||||
}
|
||||
return $ret;
|
||||
|
|
|
@ -31,7 +31,7 @@ class GstoreConnector:
|
|||
ret += c
|
||||
elif ((ord(c)>=97) and (ord(c)<=122)):
|
||||
ret += c
|
||||
else:
|
||||
elif ((ord(c)!=10) and (ord(c)!=11) and (ord(c)!=13)):
|
||||
ret += "{}{:X}".format("%", ord(c))
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in New Issue