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;
|
||||
if (url.find('?') != std::string::npos) {
|
||||
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
||||
url.erase(url.find('?'));
|
||||
}
|
||||
url = urlunescape(url);
|
||||
} else {
|
||||
seenReq = false;
|
||||
}
|
||||
|
@ -416,7 +418,9 @@ bool HTTP::Parser::parse(std::string & HTTPbuffer) {
|
|||
protocol = tmpA;
|
||||
if (url.find('?') != std::string::npos) {
|
||||
parseVars(url.substr(url.find('?') + 1)); //parse GET variables
|
||||
url.erase(url.find('?'));
|
||||
}
|
||||
url = urlunescape(url);
|
||||
} else {
|
||||
seenReq = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue