Fixed HTTP forwarding of wildcard streams

This commit is contained in:
Thulinma 2018-12-04 12:07:11 +01:00
parent de1536fb35
commit 593b291e85

View file

@ -400,9 +400,9 @@ std::string &HTTP::Parser::BuildRequest(){
std::map<std::string, std::string>::iterator it; std::map<std::string, std::string>::iterator it;
if (protocol.size() < 5 || protocol[4] != '/'){protocol = "HTTP/1.0";} if (protocol.size() < 5 || protocol[4] != '/'){protocol = "HTTP/1.0";}
if (method == "GET" && vars.size() && url.find('?') == std::string::npos){ if (method == "GET" && vars.size() && url.find('?') == std::string::npos){
builder = method + " " + url + allVars() + " " + protocol + "\r\n"; builder = method + " " + Encodings::URL::encode(url, "/:=@[]") + allVars() + " " + protocol + "\r\n";
}else{ }else{
builder = method + " " + url + " " + protocol + "\r\n"; builder = method + " " + Encodings::URL::encode(url, "/:=@[]") + " " + protocol + "\r\n";
} }
for (it = headers.begin(); it != headers.end(); it++){ for (it = headers.begin(); it != headers.end(); it++){
if ((*it).first != "" && (*it).second != ""){ if ((*it).first != "" && (*it).second != ""){