diff options
| author | Zousar Shaker <[email protected]> | 2021-11-26 08:22:35 -0700 |
|---|---|---|
| committer | Zousar Shaker <[email protected]> | 2021-11-26 08:22:35 -0700 |
| commit | ec6bda424e66f318da350b738a475759c629efec (patch) | |
| tree | ff2a6cccd997170cefe0642562b651ff0ebe3590 /zenhttp/httpasio.cpp | |
| parent | Move HandlePackageOffers out of ifdef to fix static compile error. (diff) | |
| download | zen-ec6bda424e66f318da350b738a475759c629efec.tar.xz zen-ec6bda424e66f318da350b738a475759c629efec.zip | |
Address review feedback.
Diffstat (limited to 'zenhttp/httpasio.cpp')
| -rw-r--r-- | zenhttp/httpasio.cpp | 4 |
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] == '/'))) |