aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpasio.cpp
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2021-11-26 08:22:35 -0700
committerZousar Shaker <[email protected]>2021-11-26 08:22:35 -0700
commitec6bda424e66f318da350b738a475759c629efec (patch)
treeff2a6cccd997170cefe0642562b651ff0ebe3590 /zenhttp/httpasio.cpp
parentMove HandlePackageOffers out of ifdef to fix static compile error. (diff)
downloadzen-ec6bda424e66f318da350b738a475759c629efec.tar.xz
zen-ec6bda424e66f318da350b738a475759c629efec.zip
Address review feedback.
Diffstat (limited to 'zenhttp/httpasio.cpp')
-rw-r--r--zenhttp/httpasio.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp
index f47daf3cf..b9db108db 100644
--- a/zenhttp/httpasio.cpp
+++ b/zenhttp/httpasio.cpp
@@ -1112,7 +1112,7 @@ HttpAsioServerImpl::RegisterService(const char* InUrlPath, HttpService& Service)
{
std::string_view UrlPath(InUrlPath);
Service.SetUriPrefixLength(UrlPath.size());
- if (!UrlPath.empty() && UrlPath[UrlPath.size() - 1] == '/')
+ if (!UrlPath.empty() && UrlPath.back() == '/')
{
UrlPath.remove_suffix(1);
}
@@ -1131,7 +1131,7 @@ HttpAsioServerImpl::RouteRequest(std::string_view Url)
for (const ServiceEntry& SvcEntry : m_UriHandlers)
{
const std::string& SvcUrl = SvcEntry.ServiceUrlPath;
- std::string::size_type SvcUrlSize = SvcUrl.size();
+ const std::string::size_type SvcUrlSize = SvcUrl.size();
if ((SvcUrlSize >= CandidateMatchSize) &&
Url.compare(0, SvcUrlSize, SvcUrl) == 0 &&
((SvcUrlSize == Url.size()) || (Url[SvcUrlSize] == '/')))