mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-03 20:40:17 -05:00
Merge pull request #10662 from Icinga/IsValidHeaderValue-front-back
IsValidHeaderValue: use front()/back() instead of iterators
This commit is contained in:
commit
d6e1311d52
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue