14 const std::string https_prefix =
"https://";
15 const std::string http_prefix =
"http://";
17 std::string modified_url = url;
20 std::size_t pos = modified_url.find(https_prefix);
21 if (pos == std::string::npos) {
22 pos = modified_url.find(http_prefix);
26 if (pos != std::string::npos) {
27 if (modified_url.compare(pos, https_prefix.length(), https_prefix) == 0) {
28 modified_url.erase(pos, https_prefix.length());
29 }
else if (modified_url.compare(pos, http_prefix.length(), http_prefix) == 0) {
30 modified_url.erase(pos, http_prefix.length());