From 13681d67cfd7ddc8c36fa9b0b635515b1b884143 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 20 Apr 2010 10:52:13 +0200 Subject: QNAM HTTP: Pipelining improvement Fail earlier. Use constant that was introduced in one of the previous commits. Reviewed-by: Peter Hartmann --- .../webkit/WebCore/platform/network/ResourceRequestBase.cpp | 4 +++- src/network/access/qhttpnetworkconnection.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.cpp b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.cpp index e0707d9..2738d5f 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.cpp @@ -383,7 +383,9 @@ unsigned initializeMaximumHTTPConnectionCountPerHost() { // This is used by the loader to control the number of issued parallel load requests. // Four seems to be a common default in HTTP frameworks. - return 4; + //return 4; + //return 6*(1+3); + return 6+2; } #endif diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index a6322a3..559124f 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -489,7 +489,11 @@ void QHttpNetworkConnectionPrivate::fillPipeline(QAbstractSocket *socket) int i = indexOf(socket); - if (! (defaultPipelineLength - channels[i].alreadyPipelinedRequests.length() >= 2)) { + // return fast if there was no reply right now processed + if (channels[i].reply == 0) + return; + + if (! (defaultPipelineLength - channels[i].alreadyPipelinedRequests.length() >= defaultRePipelineLength)) { return; } -- cgit v0.12