1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-27 21:35:41 +00:00

Always remove the trailing slash from computed URI.

This commit is contained in:
King_DuckZ 2017-05-22 20:32:20 +01:00
parent 6ea74d090a
commit 51810fa2f2

View file

@ -131,8 +131,9 @@ namespace tawashi {
}
}
boost::string_ref host_path = parSettings->at("host_path");
if (host_path != "/")
oss << host_path;
if (not host_path.empty() and host_path[host_path.size() - 1] == '/')
host_path = host_path.substr(0, host_path.size() - 1);
oss << host_path;
return oss.str();
}
} //unnamed namespace