diff options
author | Shane Kearns <ext-shane.2.kearns@nokia.com> | 2012-03-27 20:28:44 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-30 14:44:53 +0200 |
commit | 621f18955082fc73471e75d1f8c35c2dcd4befeb (patch) | |
tree | 8e1f8c4c30c3fddda147f9c27fb6ec733e87515f /src/corelib/io/qiodevice_p.h | |
parent | fc1e202e776934f4d286b206c84ee9c82440f7b1 (diff) |
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/qiodevice_p.h')
-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 881d85904c..c6b27b1e16 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; |