Merge pull request #10662 from Icinga/IsValidHeaderValue-front-back

IsValidHeaderValue: use front()/back() instead of iterators
This commit is contained in:
Yonas Habteab 2025-12-18 09:26:48 +01:00 committed by GitHub
commit d6e1311d52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}