[tor-commits] [tor-browser/tor-browser-24.5.0esr-4.x-1] fixup! Randomize HTTP request order and pipeline depth.

mikeperry at torproject.org mikeperry at torproject.org
Thu Jun 5 10:56:03 UTC 2014


commit 90a820bc1619812881eefdc9f9ea35205a5489d2
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Thu Jun 5 03:48:45 2014 -0700

    fixup! Randomize HTTP request order and pipeline depth.
    
    Bug 10355 testing: Randomize pipeline depth regardless of aggressive setting.
---
 netwerk/protocol/http/nsHttpConnectionMgr.cpp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
index a02fe07..931278c 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -3198,11 +3198,13 @@ nsConnectionEntry::nsConnectionEntry(nsHttpConnectionInfo *ci)
     , mPreferIPv6(false)
 {
     NS_ADDREF(mConnInfo);
+
+    // Randomize the pipeline depth (3..12)
+    mGreenDepth = gHttpHandler->GetMaxOptimisticPipelinedRequests()
+                  + rand() % (gHttpHandler->GetMaxPipelinedRequests()
+                              - gHttpHandler->GetMaxOptimisticPipelinedRequests());
+
     if (gHttpHandler->GetPipelineAggressive()) {
-        // Randomize the pipeline depth (3..12)
-        mGreenDepth = gHttpHandler->GetMaxOptimisticPipelinedRequests()
-                      + rand() % (gHttpHandler->GetMaxPipelinedRequests()
-                                  - gHttpHandler->GetMaxOptimisticPipelinedRequests());
         mPipelineState = PS_GREEN;
     }
 





More information about the tor-commits mailing list