diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ecf29bef53..1f0ad89f71 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1602,7 +1602,7 @@ pref("network.http.spdy.coalesce-hostnames", true); pref("network.http.spdy.persistent-settings", false); pref("network.http.spdy.ping-threshold", 58); pref("network.http.spdy.ping-timeout", 8); -pref("network.http.spdy.send-buffer-size", 131072); +pref("network.http.spdy.send-buffer-size", 0); // 0 - Auto (managed by OS) pref("network.http.spdy.allow-push", true); pref("network.http.spdy.push-allowance", 131072); // 128KB pref("network.http.spdy.pull-allowance", 12582912); // 12MB diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp index 9b8f13c2d2..79942af07d 100644 --- a/netwerk/protocol/http/Http2Stream.cpp +++ b/netwerk/protocol/http/Http2Stream.cpp @@ -788,8 +788,9 @@ Http2Stream::UpdateTransportSendEvents(uint32_t count) // the session and cap the send buffers by default at 128KB. // (10Mbit/sec @ 100ms) // + // This feature is disabled by default. uint32_t bufferSize = gHttpHandler->SpdySendBufferSize(); - if ((mTotalSent > bufferSize) && !mSetTCPSocketBuffer) { + if ((bufferSize > 0) && (mTotalSent > bufferSize) && !mSetTCPSocketBuffer) { mSetTCPSocketBuffer = 1; mSocketTransport->SetSendBufferSize(bufferSize); } diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 3a5ec2936c..4e96415105 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -1437,8 +1437,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) // closing the session. if (PREF_CHANGED(HTTP_PREF("spdy.send-buffer-size"))) { rv = prefs->GetIntPref(HTTP_PREF("spdy.send-buffer-size"), &val); - if (NS_SUCCEEDED(rv)) - mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff); + if (NS_SUCCEEDED(rv)) { + if (val != 0) + mSpdySendBufferSize = (uint32_t) clamped(val, 1500, 0x7fffffff); + else + mSpdySendBufferSize = 0; + } } // The maximum amount of time to wait for socket transport to be