diff options
Diffstat (limited to 'zenhttp/httpserver.cpp')
| -rw-r--r-- | zenhttp/httpserver.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/zenhttp/httpserver.cpp b/zenhttp/httpserver.cpp index 84af2b2ca..62b8d11a1 100644 --- a/zenhttp/httpserver.cpp +++ b/zenhttp/httpserver.cpp @@ -400,7 +400,8 @@ HttpServerRequest::GetQueryParams() continue; } - const std::string_view Query{QueryIt, QueryEnd}; + size_t QueryLen = ptrdiff_t(QueryEnd - QueryIt); + const std::string_view Query{QueryIt, QueryLen}; size_t DelimIndex = Query.find('&', 0); @@ -415,10 +416,10 @@ HttpServerRequest::GetQueryParams() if (EqIndex != std::string_view::npos) { - std::string_view Parm{ThisQuery.data(), EqIndex}; + std::string_view Param{ThisQuery.data(), EqIndex}; ThisQuery.remove_prefix(EqIndex + 1); - Params.KvPairs.emplace_back(Parm, ThisQuery); + Params.KvPairs.emplace_back(Param, ThisQuery); } QueryIt += DelimIndex; |