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

Side by Side 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: Fix Rebase issue Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/base/test_proxy_delegate.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 // for the proxy to use to reach the original URL via TCP. But 862 // for the proxy to use to reach the original URL via TCP. But
863 // the alternate request will be going via UDP to a different port. 863 // the alternate request will be going via UDP to a different port.
864 GURL::Replacements replacements; 864 GURL::Replacements replacements;
865 // new_port needs to be in scope here because GURL::Replacements references 865 // new_port needs to be in scope here because GURL::Replacements references
866 // the memory contained by it directly. 866 // the memory contained by it directly.
867 const std::string new_port = base::UintToString(alternative_service_.port); 867 const std::string new_port = base::UintToString(alternative_service_.port);
868 replacements.SetSchemeStr("https"); 868 replacements.SetSchemeStr("https");
869 replacements.SetPortStr(new_port); 869 replacements.SetPortStr(new_port);
870 url_for_proxy = url_for_proxy.ReplaceComponents(replacements); 870 url_for_proxy = url_for_proxy.ReplaceComponents(replacements);
871 } 871 }
872
872 return session_->proxy_service()->ResolveProxy( 873 return session_->proxy_service()->ResolveProxy(
873 url_for_proxy, request_info_.load_flags, &proxy_info_, io_callback_, 874 url_for_proxy, request_info_.method, request_info_.load_flags,
874 &pac_request_, session_->params().proxy_delegate, net_log_); 875 &proxy_info_, io_callback_, &pac_request_,
876 session_->params().proxy_delegate, net_log_);
875 } 877 }
876 878
877 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { 879 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
878 pac_request_ = NULL; 880 pac_request_ = NULL;
879 881
880 if (result == OK) { 882 if (result == OK) {
881 // Remove unsupported proxies from the list. 883 // Remove unsupported proxies from the list.
882 int supported_proxies = 884 int supported_proxies =
883 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | 885 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP |
884 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | 886 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 1614
1613 if (request_info_.load_flags & LOAD_BYPASS_PROXY) 1615 if (request_info_.load_flags & LOAD_BYPASS_PROXY)
1614 return error; 1616 return error;
1615 1617
1616 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) { 1618 if (proxy_info_.is_https() && proxy_ssl_config_.send_client_cert) {
1617 session_->ssl_client_auth_cache()->Remove( 1619 session_->ssl_client_auth_cache()->Remove(
1618 proxy_info_.proxy_server().host_port_pair()); 1620 proxy_info_.proxy_server().host_port_pair());
1619 } 1621 }
1620 1622
1621 int rv = session_->proxy_service()->ReconsiderProxyAfterError( 1623 int rv = session_->proxy_service()->ReconsiderProxyAfterError(
1622 request_info_.url, request_info_.load_flags, error, &proxy_info_, 1624 request_info_.url, request_info_.method, request_info_.load_flags, error,
1623 io_callback_, &pac_request_, session_->params().proxy_delegate, net_log_); 1625 &proxy_info_, io_callback_, &pac_request_,
1626 session_->params().proxy_delegate, net_log_);
1624 if (rv == OK || rv == ERR_IO_PENDING) { 1627 if (rv == OK || rv == ERR_IO_PENDING) {
1625 // If the error was during connection setup, there is no socket to 1628 // If the error was during connection setup, there is no socket to
1626 // disconnect. 1629 // disconnect.
1627 if (connection_->socket()) 1630 if (connection_->socket())
1628 connection_->socket()->Disconnect(); 1631 connection_->socket()->Disconnect();
1629 connection_->Reset(); 1632 connection_->Reset();
1630 if (request_) 1633 if (request_)
1631 request_->RemoveRequestFromSpdySessionRequestMap(); 1634 request_->RemoveRequestFromSpdySessionRequestMap();
1632 next_state_ = STATE_RESOLVE_PROXY_COMPLETE; 1635 next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
1633 } else { 1636 } else {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 if (connection_->socket()) { 1801 if (connection_->socket()) {
1799 ConnectionAttempts socket_attempts; 1802 ConnectionAttempts socket_attempts;
1800 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1803 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1801 request_->AddConnectionAttempts(socket_attempts); 1804 request_->AddConnectionAttempts(socket_attempts);
1802 } else { 1805 } else {
1803 request_->AddConnectionAttempts(connection_->connection_attempts()); 1806 request_->AddConnectionAttempts(connection_->connection_attempts());
1804 } 1807 }
1805 } 1808 }
1806 1809
1807 } // namespace net 1810 } // namespace net
OLDNEW
« no previous file with comments | « net/base/test_proxy_delegate.cc ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698