fix(URI): trim URI before extracting substring for improved path handling
This commit is contained in:
parent
8dc20a5715
commit
eedb5382ea
@ -60,7 +60,9 @@ void URI::parseUri(const std::string &uri)
|
||||
{
|
||||
auto const *locConfig = dynamic_cast<LocationConfig const *>(config_);
|
||||
std::string locTrimmed = utils::trim(locConfig->getPath(), "/");
|
||||
std::string uriSub = uri.substr(locTrimmed.length());
|
||||
std::string uriTrimmed = utils::trim(uri, "/");
|
||||
|
||||
std::string uriSub = uriTrimmed.substr(locTrimmed.length());
|
||||
fullPath_ = FileUtils::joinPath(locConfig->get<std::string>("root").value_or(""), uriSub);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user