summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 05:49:22 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 05:49:22 +0000
commitf7ede5d4d6971e85e99cd2c5a9052772903f9cd1 (patch)
tree5ef4de47926b27e0a9577405d54cae147783a723 /net/socket
parent15c3a30248701935f315d88fc6da29a8fb9042e6 (diff)
downloadchromium_src-f7ede5d4d6971e85e99cd2c5a9052772903f9cd1.zip
chromium_src-f7ede5d4d6971e85e99cd2c5a9052772903f9cd1.tar.gz
chromium_src-f7ede5d4d6971e85e99cd2c5a9052772903f9cd1.tar.bz2
Add back support for --testing-fixed-http-port and --testing-fixed-https-port
This is necessary to test against local reverse proxies. BUG=none TEST=none Review URL: http://codereview.chromium.org/8932010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114358 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/client_socket_pool_manager.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index 219747d..54ad7d8 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -12,6 +12,7 @@
#include "net/http/http_network_session.h"
#include "net/http/http_proxy_client_socket_pool.h"
#include "net/http/http_request_info.h"
+#include "net/http/http_stream_factory.h"
#include "net/proxy/proxy_info.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/socks_client_socket_pool.h"
@@ -63,6 +64,12 @@ int InitSocketPoolHelper(const GURL& request_url,
HostPortPair(request_url.HostNoBrackets(),
request_url.EffectiveIntPort());
+ if (!using_ssl && HttpStreamFactory::testing_fixed_http_port() != 0) {
+ origin_host_port.set_port(HttpStreamFactory::testing_fixed_http_port());
+ } else if (using_ssl && HttpStreamFactory::testing_fixed_https_port() != 0) {
+ origin_host_port.set_port(HttpStreamFactory::testing_fixed_https_port());
+ }
+
bool disable_resolver_cache =
request_load_flags & LOAD_BYPASS_CACHE ||
request_load_flags & LOAD_VALIDATE_CACHE ||