HTTP parser now unescapes URLs
This commit is contained in:
parent
a7a7411fc1
commit
f3060781a7
1 changed files with 4 additions and 0 deletions
|
@ -402,7 +402,9 @@ bool HTTP::Parser::parse(std::string & HTTPbuffer) {
|
||||||
method = tmpA;
|
method = tmpA;
|
||||||
if (url.find('?') != std::string::npos) {
|
if (url.find('?') != std::string::npos) {
|
||||||
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
||||||
|
url.erase(url.find('?'));
|
||||||
}
|
}
|
||||||
|
url = urlunescape(url);
|
||||||
} else {
|
} else {
|
||||||
seenReq = false;
|
seenReq = false;
|
||||||
}
|
}
|
||||||
|
@ -416,7 +418,9 @@ bool HTTP::Parser::parse(std::string & HTTPbuffer) {
|
||||||
protocol = tmpA;
|
protocol = tmpA;
|
||||||
if (url.find('?') != std::string::npos) {
|
if (url.find('?') != std::string::npos) {
|
||||||
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
||||||
|
url.erase(url.find('?'));
|
||||||
}
|
}
|
||||||
|
url = urlunescape(url);
|
||||||
} else {
|
} else {
|
||||||
seenReq = false;
|
seenReq = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue