From df9a6bcd339a43f7354fe4ac33fd172c75bf7da9 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Wed, 16 Jan 2019 07:00:07 -0500 Subject: [PATCH] Fix QUIC auth scheme Auth controller still uses https:// for QUIC. --- src/net/tools/naive/naive_proxy_bin.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/net/tools/naive/naive_proxy_bin.cc b/src/net/tools/naive/naive_proxy_bin.cc index 719e90d6a6..5dcc44b71c 100644 --- a/src/net/tools/naive/naive_proxy_bin.cc +++ b/src/net/tools/naive/naive_proxy_bin.cc @@ -149,7 +149,11 @@ std::unique_ptr BuildURLRequestContext( !params.proxy_pass.empty()) { auto* session = context->http_transaction_factory()->GetSession(); auto* auth_cache = session->http_auth_cache(); - GURL auth_origin(params.proxy_url); + std::string proxy_url = params.proxy_url; + if (proxy_url.compare(0, 7, "quic://") == 0) { + proxy_url.replace(0, 4, "https"); + } + GURL auth_origin(proxy_url); net::AuthCredentials credentials(base::ASCIIToUTF16(params.proxy_user), base::ASCIIToUTF16(params.proxy_pass)); auth_cache->Add(auth_origin, /*realm=*/std::string(),