mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-11-23 00:33:44 +00:00
Always remove the trailing slash from computed URI.
This commit is contained in:
parent
6ea74d090a
commit
51810fa2f2
1 changed files with 3 additions and 2 deletions
|
@ -131,7 +131,8 @@ namespace tawashi {
|
|||
}
|
||||
}
|
||||
boost::string_ref host_path = parSettings->at("host_path");
|
||||
if (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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue