Update url_request_http_job.cc

This commit is contained in:
Alexander David Frick 2022-01-10 03:52:44 -06:00 committed by GitHub
parent ab5e91b785
commit 7fd839323f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,7 @@
#include "url/origin.h"
#include "url/url_constants.h"
#if defined(OS_ANDROID)
#if BUILDFLAG(IS_ANDROID)
#include "net/android/network_library.h"
#endif
@ -205,7 +205,7 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
RedirectUtil::ResponseCode::REDIRECT_307_TEMPORARY_REDIRECT, "HSTS");
}
#if defined(OS_ANDROID)
#if BUILDFLAG(IS_ANDROID)
// Check whether the app allows cleartext traffic to this host, and return
// ERR_CLEARTEXT_NOT_PERMITTED if not.
if (request->context()->check_cleartext_permitted() &&
@ -300,7 +300,7 @@ void URLRequestHttpJob::Start() {
request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
referer_value);
}
}
}
if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
request_info_.extra_headers.SetHeaderIfMissing(