diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-22 22:15:40 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-22 22:15:40 (GMT) |
commit | 00062150f61f5930a158594583a564d659232216 (patch) | |
tree | 2d1685fa729bcac9c08fdd43b5c2436d6ad1d342 /src/network | |
parent | f28990edd2c95f4382d661e4731d06060bb11b39 (diff) | |
parent | 14f10211e72f2d04fa7f4e0faa430eb94c1f8f83 (diff) | |
download | Qt-00062150f61f5930a158594583a564d659232216.zip Qt-00062150f61f5930a158594583a564d659232216.tar.gz Qt-00062150f61f5930a158594583a564d659232216.tar.bz2 |
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration:
Fix crash in PropertyChanges.
Scroll correctly when cursorPosition is changed within onTextChanged.
Fixing OpenGL module build error on Solaris
Fix dialog position adjustment regression in Symbian
SSL readbuffer 16->32 kB
Fixes to how resize event and layout request are posted.
Limit the cookies count per domain to 50.
Add missing freeTexture() from fix for QTBUG-19180
Last word inputted was duplicated after input method hints changed
Simplify texture pooling logic in GL graphics system.
Fixed move a QGraphicsWidget and invalidate its layout at the same time
Fix infinite recursion when changing geometry on Mac
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkcookiejar.cpp | 27 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 4 |
2 files changed, 22 insertions, 9 deletions
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index a2fa689..1a5f73b 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -220,20 +220,33 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis continue; // not accepted } - QList<QNetworkCookie>::Iterator it = d->allCookies.begin(), - end = d->allCookies.end(); - for ( ; it != end; ++it) + for (int i = 0; i < d->allCookies.size(); ++i) { // does this cookie already exist? - if (cookie.name() == it->name() && - cookie.domain() == it->domain() && - cookie.path() == it->path()) { + const QNetworkCookie ¤t = d->allCookies.at(i); + if (cookie.name() == current.name() && + cookie.domain() == current.domain() && + cookie.path() == current.path()) { // found a match - d->allCookies.erase(it); + d->allCookies.removeAt(i); break; } + } // did not find a match if (!isDeletion) { + int countForDomain = 0; + for (int i = d->allCookies.size() - 1; i >= 0; --i) { + // Start from the end and delete the oldest cookies to keep a maximum count of 50. + const QNetworkCookie ¤t = d->allCookies.at(i); + if (isParentDomain(cookie.domain(), current.domain()) + || isParentDomain(current.domain(), cookie.domain())) { + if (countForDomain >= 49) + d->allCookies.removeAt(i); + else + ++countForDomain; + } + } + d->allCookies += cookie; ++added; } diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 4747f29..9a137a6 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -1338,9 +1338,9 @@ bool QSslSocketBackendPrivate::startHandshake() sslErrors.clear(); } - // if we have a max read buffer size, reset the plain socket's to 16k + // if we have a max read buffer size, reset the plain socket's to 32k if (readBufferMaxSize) - plainSocket->setReadBufferSize(16384); + plainSocket->setReadBufferSize(32768); connectionEncrypted = true; emit q->encrypted(); |