feat: migrate protocol module to NetworkService (Part 12) (#18726)
* Support "uploadData" in "request" argument * Support "uploadData" option in http handler * Fix building on win32
This commit is contained in:
parent
e5d1e7b4da
commit
0e3ab7c128
4 changed files with 51 additions and 7 deletions
|
@ -372,6 +372,10 @@ void AtomURLLoaderFactory::StartLoadingHttp(
|
|||
if (!dict.Get("method", &request->method))
|
||||
request->method = original_request.method;
|
||||
|
||||
base::DictionaryValue upload_data;
|
||||
if (request->method != "GET" && request->method != "HEAD")
|
||||
dict.Get("uploadData", &upload_data);
|
||||
|
||||
scoped_refptr<AtomBrowserContext> browser_context =
|
||||
AtomBrowserContext::From("", false);
|
||||
v8::Local<v8::Value> value;
|
||||
|
@ -393,7 +397,8 @@ void AtomURLLoaderFactory::StartLoadingHttp(
|
|||
new URLPipeLoader(
|
||||
url_loader_factory, std::move(request), std::move(loader),
|
||||
std::move(client),
|
||||
static_cast<net::NetworkTrafficAnnotationTag>(traffic_annotation));
|
||||
static_cast<net::NetworkTrafficAnnotationTag>(traffic_annotation),
|
||||
std::move(upload_data));
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue