Modify CefResponse header methods to match CefRequest API (fixes issue #2770)

This commit is contained in:
Mike Wiedenbauer
2019-10-14 13:32:38 +02:00
committed by Marshall Greenblatt
parent 9cdda243a1
commit 1d515adc22
16 changed files with 231 additions and 50 deletions

View File

@ -6,17 +6,25 @@
#define CEF_LIBCEF_COMMON_NET_HTTP_HEADER_UTILS_H_
#pragma once
#include <map>
#include <string>
#include "include/cef_request.h"
#include "include/cef_base.h"
namespace HttpHeaderUtils {
typedef CefRequest::HeaderMap HeaderMap;
typedef std::multimap<CefString, CefString> HeaderMap;
std::string GenerateHeaders(const HeaderMap& map);
void ParseHeaders(const std::string& header_str, HeaderMap& map);
// Convert |str| to lower-case.
void MakeASCIILower(std::string* str);
// Finds the first instance of |name| (already lower-case) in |map| with
// case-insensitive comparison.
HeaderMap::iterator FindHeaderInMap(const std::string& name, HeaderMap& map);
} // namespace HttpHeaderUtils
#endif // CEF_LIBCEF_COMMON_NET_HTTP_HEADER_UTILS_H_