mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
http: fix & test url with https but empty service
This commit is contained in:
1 parent
7270c353df
commit
87f6f3df8b
3 files changed
+19
-1
No files matched your search
+3
-1
@@ -43,8 +43,10 @@ Url::Url(const std::string& url): url(url)
|
||||
const size_t proto_end = url.find("://");
|
||||
if (proto_end != std::string::npos){
|
||||
addr_begin = proto_end + 3;
|
||||
if (url.substr(0, proto_end) == "https")
|
||||
if (url.substr(0, proto_end) == "https"){
|
||||
protocol = "https";
|
||||
service = protocol;
|
||||
}
|
||||
}
|
||||
// host and service
|
||||
size_t addr_size = url.substr(addr_begin).find("/");
|
||||
|
||||
Reference in new issue
Block a user