Skip to content

Commit

Permalink
Remove net::LOAD_DO_NOT_SEND_COOKIES and net::LOAD_DO_NOT_SEND_AUTH_D…
Browse files Browse the repository at this point in the history
…ATA (#3072)

b/336799788

(cherry picked from commit 2ccd1d1)
  • Loading branch information
sherryzy authored and anonymous1-me committed Apr 29, 2024
1 parent ec6c4a3 commit b703ed2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion cobalt/build/cobalt_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def GetWebPlatformTestFilters(self):
'websockets/WebPlatformTest.Run/websockets_opening_handshake_005_html',
'service_workers/WebPlatformTest.Run/service_workers_service_worker_register_wait_forever_in_install_worker_https_html',
'csp/WebPlatformTest.Run/content_security_policy_script_src_script_src_1_10_1_html',
'cors/WebPlatformTest.Run/cors_credentials_flag_htm',
'html/WebPlatformTest.Run/html_dom_documents_dom_tree_accessors_Document_currentScript_sub_html',
]
return filters
Expand Down
4 changes: 1 addition & 3 deletions cobalt/updater/network_fetcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,9 @@ void NetworkFetcher::CreateUrlFetcher(
// Request mode is kCORSModeOmitCredentials.
const uint32 kDisableCookiesAndCacheLoadFlags =
net::LOAD_NORMAL | net::LOAD_DO_NOT_SAVE_COOKIES |
#ifndef COBALT_PENDING_CLEAN_UP
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SEND_AUTH_DATA |
#endif
net::LOAD_DISABLE_CACHE;
url_fetcher_->SetLoadFlags(kDisableCookiesAndCacheLoadFlags);
url_fetcher_->SetAllowCredentials(false);

url_fetcher_->SetAutomaticallyRetryOnNetworkChanges(
kMaxRetriesOnNetworkChange);
Expand Down
6 changes: 2 additions & 4 deletions cobalt/xhr/xml_http_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1457,12 +1457,10 @@ void XMLHttpRequestImpl::StartRequest(const std::string& request_body) {
// To make a cross-origin request, add origin, referrer source, credentials,
// omit credentials flag, force preflight flag
if (!with_credentials_) {
#ifndef COBALT_PENDING_CLEAN_UP
const uint32 kDisableCookiesLoadFlags =
net::LOAD_NORMAL | net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SEND_AUTH_DATA;
net::LOAD_NORMAL | net::LOAD_DO_NOT_SAVE_COOKIES;
url_fetcher_->SetLoadFlags(kDisableCookiesLoadFlags);
#endif
url_fetcher_->SetAllowCredentials(false);
} else {
// For credentials mode: If the withCredentials attribute value is true,
// "include", and "same-origin" otherwise.
Expand Down

0 comments on commit b703ed2

Please sign in to comment.