| Index: net/url_request/url_request_http_job.cc
|
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
|
| index 7855fe25cac0af1be6f9e46ac04752f4c1274ae7..a398986da32fc39d59e47055b80fc5888f49b33a 100644
|
| --- a/net/url_request/url_request_http_job.cc
|
| +++ b/net/url_request/url_request_http_job.cc
|
| @@ -716,8 +716,12 @@ void URLRequestHttpJob::AddExtraHeaders() {
|
|
|
| // Advertise "br" encoding only if transferred data is opaque to proxy.
|
| bool advertise_brotli = false;
|
| - if (request()->context()->enable_brotli())
|
| - advertise_brotli = request()->url().SchemeIsCryptographic();
|
| + if (request()->context()->enable_brotli()) {
|
| + if (request()->url().SchemeIsCryptographic() ||
|
| + IsLocalhost(request()->url().HostNoBrackets())) {
|
| + advertise_brotli = true;
|
| + }
|
| + }
|
|
|
| // Supply Accept-Encoding headers first so that it is more likely that they
|
| // will be in the first transmitted packet. This can sometimes make it
|
|
|