Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15065

Fix HTTP QNetworkReply setReadBufferSize() once and for all

    XMLWordPrintable

Details

    Description

      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)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              cnn Qt Core & Network
              mgoetz Markus Goetz (Inactive)
              Votes:
              18 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes