Merge branch 'development' into LTS_development
# Conflicts: # lib/http_parser.cpp
This commit is contained in:
commit
8cecfabfc2
3 changed files with 7 additions and 7 deletions
|
@ -108,7 +108,7 @@ namespace HTTP{
|
||||||
H.SetHeader("Host", proxyUrl.host);
|
H.SetHeader("Host", proxyUrl.host);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
H.url = "/" + Encodings::URL::encode(link.path);
|
H.url = "/" + Encodings::URL::encode(link.path, "/:=@[]");
|
||||||
if (link.args.size()){H.url += "?" + link.args;}
|
if (link.args.size()){H.url += "?" + link.args;}
|
||||||
if (link.port.size()){
|
if (link.port.size()){
|
||||||
H.SetHeader("Host", link.host + ":" + link.port);
|
H.SetHeader("Host", link.host + ":" + link.port);
|
||||||
|
|
|
@ -97,8 +97,8 @@ namespace Encodings{
|
||||||
for (int i = 0; i < max; i++){
|
for (int i = 0; i < max; i++){
|
||||||
if (('0' <= c[i] && c[i] <= '9') || ('a' <= c[i] && c[i] <= 'z') ||
|
if (('0' <= c[i] && c[i] <= '9') || ('a' <= c[i] && c[i] <= 'z') ||
|
||||||
('A' <= c[i] && c[i] <= 'Z') ||
|
('A' <= c[i] && c[i] <= 'Z') ||
|
||||||
(c[i] == '$' || c[i] == '-' || c[i] == '_' || c[i] == '.' || c[i] == ',' || c[i] == '!' ||
|
(c[i] == '$' || c[i] == '-' || c[i] == '_' || c[i] == '.' || c[i] == ',' || c[i] == '!' || c[i] == '~' || c[i] == ';' ||
|
||||||
c[i] == '*' || c[i] == '(' || c[i] == ')' || c[i] == '/' || c[i] == '\'') || (ign.size() && ign.find(c[i]) != std::string::npos)){
|
c[i] == '*' || c[i] == '(' || c[i] == ')' || c[i] == '\'') || (ign.size() && ign.find(c[i]) != std::string::npos)){
|
||||||
escaped.append(&c[i], 1);
|
escaped.append(&c[i], 1);
|
||||||
}else{
|
}else{
|
||||||
if (c[i] == ' '){
|
if (c[i] == ' '){
|
||||||
|
|
|
@ -185,10 +185,10 @@ std::string HTTP::URL::getUrl() const{
|
||||||
if (protocol == "rtsp"){
|
if (protocol == "rtsp"){
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
||||||
}else{
|
}else{
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=");}
|
if (path.size()){ret += Encodings::URL::encode(path, "/:=@[]");}
|
||||||
}
|
}
|
||||||
if (args.size()){ret += "?" + args;}
|
if (args.size()){ret += "?" + args;}
|
||||||
if (frag.size()){ret += "#" + Encodings::URL::encode(frag, "=");}
|
if (frag.size()){ret += "#" + Encodings::URL::encode(frag, "/:=@[]#?&");}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ std::string HTTP::URL::getProxyUrl() const{
|
||||||
if (protocol == "rtsp"){
|
if (protocol == "rtsp"){
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
||||||
}else{
|
}else{
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=");}
|
if (path.size()){ret += Encodings::URL::encode(path, "/:=@[]");}
|
||||||
}
|
}
|
||||||
if (args.size()){ret += "?" + args;}
|
if (args.size()){ret += "?" + args;}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -242,7 +242,7 @@ std::string HTTP::URL::getBareUrl() const{
|
||||||
if (protocol == "rtsp"){
|
if (protocol == "rtsp"){
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
if (path.size()){ret += Encodings::URL::encode(path, "=#?&");}
|
||||||
}else{
|
}else{
|
||||||
if (path.size()){ret += Encodings::URL::encode(path, "=");}
|
if (path.size()){ret += Encodings::URL::encode(path, "/:=@[]");}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue