Investigate test failures of tst_QNetworkReply::ioGetFromBuiltinHttp
There is multiple layers where the read buffer must be limited.
QNetworkReply - QHttpNetworkReply - QAbstractSocket - OS
Right now we do not limit everything properly. By properly I mean we take the actual value given to setReadBufferSize.
Right now it is more like that:
QNetworkReply: Take value into account
QHttpNetworkReply: Just take into account that we are limited and then behave differently
QAbstractSocket: Have a fixed 64kB buffer no matter what
OS: Have the OS automatically adjust its receive buffer
We should change this to be able to more properly do bandwidth limiting when downloading.
Also pay attention to the SSL use case. There is another QTcpSocket currently inside the QSslSocket. Also there is buffering inside OpenSSL.
Also pay attention to proxy connections. SOCKS5 and HTTP proxy engines have an internal QTcpSocket used to talk to the proxy server. In 4.7.3 and earlier, this had an unlimited buffer. (it will soon be limited to avoid out of memory errors)