Commit fb0c7827 authored by Nicolas Ouellet-Payeur's avatar Nicolas Ouellet-Payeur Committed by Commit Bot

[BrowserSwitcher] Kerberos/NTLM support for XML sitelist

Include credentials in the HTTP request to download the XML. This allows
the server to perform e.g. Kerberos or NTLM authentication.

TESTED=Hosted sitelist.xml on an IIS server with NTLM auth.
    Before patch: rules don't get applied.
    After patch: rules get applied.
    Also checked chrome://net-export logs to make sure the
    `WWW-Authenticate' and `Authorization' headers are present.

Bug: 1025946, 1063457
Change-Id: Ibbc86ea3feca17b1c918493698df906656c2f904
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2118230
Auto-Submit: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: default avatarJulian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753230}
parent ac62d9f1
...@@ -140,7 +140,7 @@ void XmlDownloader::FetchXml() { ...@@ -140,7 +140,7 @@ void XmlDownloader::FetchXml() {
auto request = std::make_unique<network::ResourceRequest>(); auto request = std::make_unique<network::ResourceRequest>();
request->url = source.url; request->url = source.url;
request->load_flags = net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE; request->load_flags = net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE;
request->credentials_mode = network::mojom::CredentialsMode::kOmit; request->credentials_mode = network::mojom::CredentialsMode::kInclude;
source.url_loader = network::SimpleURLLoader::Create(std::move(request), source.url_loader = network::SimpleURLLoader::Create(std::move(request),
traffic_annotation); traffic_annotation);
source.url_loader->SetRetryOptions( source.url_loader->SetRetryOptions(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment