summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-12 12:17:28 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-10-12 12:53:24 (GMT)
commit9a9f3646a2c7db0bb6d6edfd370175618471ad5a (patch)
treeecc7837119b0d3695bd0399aa75b37dc672ba582 /src
parentdf7155db6142e959db76a65cb47cae7f0338d538 (diff)
downloadQt-9a9f3646a2c7db0bb6d6edfd370175618471ad5a.zip
Qt-9a9f3646a2c7db0bb6d6edfd370175618471ad5a.tar.gz
Qt-9a9f3646a2c7db0bb6d6edfd370175618471ad5a.tar.bz2
QHttpNetworkConnectionChannel: Limit the socket read buffer
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index beab9af..81fac57 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -69,6 +69,11 @@ void QHttpNetworkConnectionChannel::init()
socket = new QTcpSocket;
#endif
+ // limit the socket read buffer size. we will read everything into
+ // the QHttpNetworkReply anyway, so let's grow only that and not
+ // here and there.
+ socket->setReadBufferSize(64*1024);
+
QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
this, SLOT(_q_bytesWritten(qint64)),
Qt::DirectConnection);