enable pipelining over SSL by default. b=414477, r=biesi, sr=shaver, a=mconnor

This commit is contained in:
dwitte@stanford.edu 2008-02-06 20:04:56 -08:00
parent e4454bb03a
commit 51a4adec0c
3 changed files with 14 additions and 0 deletions

View File

@ -592,6 +592,7 @@ pref("network.http.redirection-limit", 20);
pref("network.http.accept-encoding" ,"gzip,deflate");
pref("network.http.pipelining" , false);
pref("network.http.pipelining.ssl" , true); // enable pipelining over SSL
pref("network.http.proxy.pipelining", false);
// Max number of requests in the pipeline

View File

@ -168,6 +168,7 @@ nsHttpHandler::nsHttpHandler()
, mMaxPipelinedRequests(2)
, mRedirectionLimit(10)
, mPhishyUserPassLength(1)
, mPipeliningOverSSL(PR_FALSE)
, mLastUniqueID(NowInSeconds())
, mSessionStartTime(0)
, mProduct("Gecko")
@ -1019,6 +1020,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
}
}
if (PREF_CHANGED(HTTP_PREF("pipelining.ssl"))) {
rv = prefs->GetBoolPref(HTTP_PREF("pipelining.ssl"), &cVar);
if (NS_SUCCEEDED(rv))
mPipeliningOverSSL = cVar;
}
if (PREF_CHANGED(HTTP_PREF("proxy.pipelining"))) {
rv = prefs->GetBoolPref(HTTP_PREF("proxy.pipelining"), &cVar);
if (NS_SUCCEEDED(rv)) {
@ -1495,6 +1502,10 @@ nsHttpHandler::NewProxiedChannel(nsIURI *uri,
caps = mCapabilities;
if (https) {
// enable pipelining over SSL if requested
if (mPipeliningOverSSL)
caps |= NS_HTTP_ALLOW_PIPELINING;
// HACK: make sure PSM gets initialized on the main thread.
nsCOMPtr<nsISocketProviderService> spserv =
do_GetService(kSocketProviderServiceCID);

View File

@ -259,6 +259,8 @@ private:
// the userpass field of the URL to obscure the actual origin server.
PRUint8 mPhishyUserPassLength;
PRPackedBool mPipeliningOverSSL;
nsCString mAccept;
nsCString mAcceptLanguages;
nsCString mAcceptEncodings;