mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use multimap type for storing header values (issue #386).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@346 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -94,13 +94,13 @@ void CefRequestCToCpp::GetHeaderMap(HeaderMap& headerMap)
|
||||
if(CEF_MEMBER_MISSING(struct_, get_header_map))
|
||||
return;
|
||||
|
||||
cef_string_map_t map = cef_string_map_alloc();
|
||||
cef_string_multimap_t map = cef_string_multimap_alloc();
|
||||
if(!map)
|
||||
return;
|
||||
|
||||
struct_->get_header_map(struct_, map);
|
||||
transfer_string_map_contents(map, headerMap);
|
||||
cef_string_map_free(map);
|
||||
transfer_string_multimap_contents(map, headerMap);
|
||||
cef_string_multimap_free(map);
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::SetHeaderMap(const HeaderMap& headerMap)
|
||||
@@ -108,18 +108,18 @@ void CefRequestCToCpp::SetHeaderMap(const HeaderMap& headerMap)
|
||||
if(CEF_MEMBER_MISSING(struct_, set_header_map))
|
||||
return;
|
||||
|
||||
cef_string_map_t map = NULL;
|
||||
cef_string_multimap_t map = NULL;
|
||||
if(!headerMap.empty()) {
|
||||
map = cef_string_map_alloc();
|
||||
map = cef_string_multimap_alloc();
|
||||
if(!map)
|
||||
return;
|
||||
transfer_string_map_contents(headerMap, map);
|
||||
transfer_string_multimap_contents(headerMap, map);
|
||||
}
|
||||
|
||||
struct_->set_header_map(struct_, map);
|
||||
|
||||
if(map)
|
||||
cef_string_map_free(map);
|
||||
cef_string_multimap_free(map);
|
||||
}
|
||||
|
||||
void CefRequestCToCpp::Set(const CefString& url, const CefString& method,
|
||||
@@ -132,19 +132,19 @@ void CefRequestCToCpp::Set(const CefString& url, const CefString& method,
|
||||
if(postData.get())
|
||||
postDataStruct = CefPostDataCToCpp::Unwrap(postData);
|
||||
|
||||
cef_string_map_t map = NULL;
|
||||
cef_string_multimap_t map = NULL;
|
||||
if(!headerMap.empty()) {
|
||||
map = cef_string_map_alloc();
|
||||
map = cef_string_multimap_alloc();
|
||||
if(!map)
|
||||
return;
|
||||
transfer_string_map_contents(headerMap, map);
|
||||
transfer_string_multimap_contents(headerMap, map);
|
||||
}
|
||||
|
||||
struct_->set(struct_, url.GetStruct(), method.GetStruct(), postDataStruct,
|
||||
map);
|
||||
|
||||
if(map)
|
||||
cef_string_map_free(map);
|
||||
cef_string_multimap_free(map);
|
||||
}
|
||||
|
||||
CefRequest::RequestFlags CefRequestCToCpp::GetFlags()
|
||||
|
Reference in New Issue
Block a user