When writing to a QTcpSocket through an HttpProxy, the bytesWritten signal is emitted right after QTcpSocket::write() is called. In some applications this cause all the writes to be buffered up in memory until disconnectFromHost() is called.
Compounding the issue, QAbstractSocket::disconnectFromHost() forcibly close the socket if pending writes don't complete after two seconds. This was apparently intended to avoid a Mac bug (see comment in that function)
This was first noticed using QFtp in Qt4 but the core issue still exists on a recent checkout of the Qt5 dev branch.