mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add CefPostData::HasExcludedElements which returns true if the underlying
POST data includes elements that are not represented (issue #1761). - Add CefRequest::SetReferrer and CefRequest::GetReferrer[URL|Policy]. The Referer value will no longer be stored in the header map. - Move request-related conversion logic to CefRequestImpl and standardize the implementation.
This commit is contained in:
@ -107,21 +107,8 @@ class CefRenderURLRequest::Context
|
||||
url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags()));
|
||||
|
||||
WebURLRequest urlRequest;
|
||||
static_cast<CefRequestImpl*>(request_.get())->Get(urlRequest, false);
|
||||
|
||||
if (urlRequest.reportUploadProgress()) {
|
||||
// Attempt to determine the upload data size.
|
||||
CefRefPtr<CefPostData> post_data = request_->GetPostData();
|
||||
if (post_data.get()) {
|
||||
CefPostData::ElementVector elements;
|
||||
post_data->GetElements(elements);
|
||||
if (elements.size() == 1 && elements[0]->GetType() == PDE_TYPE_BYTES) {
|
||||
CefPostDataElementImpl* impl =
|
||||
static_cast<CefPostDataElementImpl*>(elements[0].get());
|
||||
upload_data_size_ = impl->GetBytesCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
static_cast<CefRequestImpl*>(request_.get())->Get(urlRequest,
|
||||
upload_data_size_);
|
||||
|
||||
loader_->loadAsynchronously(urlRequest, url_client_.get());
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user