mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Modify CefResponse header methods to match CefRequest API (fixes issue #2770)
This commit is contained in:
committed by
Marshall Greenblatt
parent
9cdda243a1
commit
1d515adc22
@@ -4,6 +4,9 @@
|
||||
|
||||
#include "libcef/common/net/http_header_utils.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/strings/string_util.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_util.h"
|
||||
|
||||
@@ -40,4 +43,18 @@ void ParseHeaders(const std::string& header_str, HeaderMap& map) {
|
||||
}
|
||||
}
|
||||
|
||||
void MakeASCIILower(std::string* str) {
|
||||
std::transform(str->begin(), str->end(), str->begin(), ::tolower);
|
||||
}
|
||||
|
||||
HeaderMap::iterator FindHeaderInMap(const std::string& nameLower,
|
||||
HeaderMap& map) {
|
||||
for (auto it = map.begin(); it != map.end(); ++it) {
|
||||
if (base::EqualsCaseInsensitiveASCII(it->first.ToString(), nameLower))
|
||||
return it;
|
||||
}
|
||||
|
||||
return map.end();
|
||||
}
|
||||
|
||||
} // namespace HttpHeaderUtils
|
||||
|
Reference in New Issue
Block a user