bug 652928 add socks proxy host:port information to connection info key r=jduell
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 05 Sep 2012 08:32:28 -0400
changeset 104287 233275bcbdf69d450ebb36a286b1d9c9a19d4bfc
parent 104286 f2bc7b6958cd2c95032ae15177240cb05616c84e
child 104288 49cdfadd5aefc3f82bbad1a5a4c5d11ecab89d38
push id23417
push userryanvm@gmail.com
push dateThu, 06 Sep 2012 02:27:31 +0000
treeherdermozilla-central@501f4e46a88c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs652928
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 652928 add socks proxy host:port information to connection info key r=jduell
netwerk/protocol/http/nsHttpConnectionInfo.cpp
--- a/netwerk/protocol/http/nsHttpConnectionInfo.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.cpp
@@ -39,21 +39,25 @@ nsHttpConnectionInfo::SetOriginServer(co
     mHashKey.AppendInt(keyPort);
 
     if (mUsingHttpProxy)
         mHashKey.SetCharAt('P', 0);
     if (mUsingSSL)
         mHashKey.SetCharAt('S', 1);
 
     // NOTE: for transparent proxies (e.g., SOCKS) we need to encode the proxy
-    // type in the hash key (this ensures that we will continue to speak the
+    // info in the hash key (this ensures that we will continue to speak the
     // right protocol even if our proxy preferences change).
     if (!mUsingHttpProxy && ProxyHost()) {
         mHashKey.AppendLiteral(" (");
         mHashKey.Append(ProxyType());
+        mHashKey.Append(':');
+        mHashKey.Append(ProxyHost());
+        mHashKey.Append(':');
+        mHashKey.AppendInt(ProxyPort());
         mHashKey.Append(')');
     }
 }
 
 nsHttpConnectionInfo*
 nsHttpConnectionInfo::Clone() const
 {
     nsHttpConnectionInfo* clone = new nsHttpConnectionInfo(mHost, mPort, mProxyInfo, mUsingSSL);