I use GetResourceResponseFilter to write the body of the POST-request, and everything works fine, but for some reason sometimes for some POST-request- the body is missing. Here is the simplified code I use:
- Code: Select all
virtual CefRefPtr<CefResponseFilter> GetResourceResponseFilter(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefResponse> response)
{
std::string my_method= (*request).GetMethod().ToString();
if(my_method == POST)
{
CefRefPtr<CefPostData> CefPostData_ptr = (*request).GetPostData();
CefPostData::ElementVector elements_post_vec;
(*CefPostData_ptr).GetElements(elements_post_vec); //Not always, but sometimes for some reason the elements_post_vec is zero.
}
}
This is despite the fact that when I request GetHeaderMap from a request - there is clearly a long POST of the request: content-length:43
Is this normal?