Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resubmitting with upstream branch set to branch from issue 1680893002 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 2cd8080711357600f96e305612aa89a4ed87c335..190bf9831ac4336b83a6c299fb7f90a27d2dbb1d 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -805,23 +805,25 @@ int HttpStreamFactoryImpl::Job::DoResolveProxy() {
// for the proxy to use to reach the original URL via TCP. But
// the alternate request will be going via UDP to a different port.
GURL::Replacements replacements;
// new_port needs to be in scope here because GURL::Replacements references
// the memory contained by it directly.
const std::string new_port = base::UintToString(alternative_service_.port);
replacements.SetSchemeStr("https");
replacements.SetPortStr(new_port);
url_for_proxy = url_for_proxy.ReplaceComponents(replacements);
}
+
return session_->proxy_service()->ResolveProxy(
url_for_proxy, request_info_.load_flags, &proxy_info_, io_callback_,
- &pac_request_, session_->params().proxy_delegate, net_log_);
+ &pac_request_, session_->params().proxy_delegate, request_info_.method,
+ net_log_);
}
int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
pac_request_ = NULL;
if (result == OK) {
// Remove unsupported proxies from the list.
int supported_proxies =
ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP |
ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 |
@@ -1539,21 +1541,22 @@ int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) {
if (request_info_.load_flags & LOAD_BYPASS_PROXY)
return error;
if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) {
session_->ssl_client_auth_cache()->Remove(
proxy_info_.proxy_server().host_port_pair());
}
int rv = session_->proxy_service()->ReconsiderProxyAfterError(
request_info_.url, request_info_.load_flags, error, &proxy_info_,
- io_callback_, &pac_request_, session_->params().proxy_delegate, net_log_);
+ io_callback_, &pac_request_, session_->params().proxy_delegate,
+ request_info_.method, net_log_);
if (rv == OK || rv == ERR_IO_PENDING) {
// If the error was during connection setup, there is no socket to
// disconnect.
if (connection_->socket())
connection_->socket()->Disconnect();
connection_->Reset();
if (request_)
request_->RemoveRequestFromSpdySessionRequestMap();
next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
} else {

Powered by Google App Engine
This is Rietveld 408576698