diff --git a/lib/remote/httputility.cpp b/lib/remote/httputility.cpp index a3c853812..fbf95f2a9 100644 --- a/lib/remote/httputility.cpp +++ b/lib/remote/httputility.cpp @@ -138,7 +138,7 @@ bool HttpUtility::IsValidHeaderValue(std::string_view value) if (!value.empty()) { // Must not start or end with space or tab. - for (char c : {*value.begin(), *value.rbegin()}) { + for (char c : {value.front(), value.back()}) { if (c == ' ' || c == '\t') { return false; }