diff options
author | Shane Kearns <ext-shane.2.kearns@nokia.com> | 2012-03-27 19:28:44 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 12:44:53 (GMT) |
commit | 621f18955082fc73471e75d1f8c35c2dcd4befeb (patch) | |
tree | 8e1f8c4c30c3fddda147f9c27fb6ec733e87515f /src/corelib/io | |
parent | fc1e202e776934f4d286b206c84ee9c82440f7b1 (diff) | |
download | Qt-621f18955082fc73471e75d1f8c35c2dcd4befeb.zip Qt-621f18955082fc73471e75d1f8c35c2dcd4befeb.tar.gz Qt-621f18955082fc73471e75d1f8c35c2dcd4befeb.tar.bz2 |
Fix regressions due to partial QSslSocket::peek fix
The fix broke HTTPS transactions with chunked encoding.
It also broke use of a QSslSocket in unencrypted mode where peek
and read calls are mixed.
See change 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513.
Change-Id: Ib115b3737b0e4217496f5def10aaaea3c6452ff8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qiodevice_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index 881d859..c6b27b1 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -110,6 +110,11 @@ public: first += r; return r; } + int peek(char* target, int size) { + int r = qMin(size, len); + memcpy(target, first, r); + return r; + } char* reserve(int size) { makeSpace(size + len, freeSpaceAtEnd); char* writePtr = first + len; |