diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-04 12:21:10 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-04 12:21:10 (GMT) |
commit | 4a079000243ed05ce37d3c7055b5bd56c7ccf85d (patch) | |
tree | 3bb9bf991e13a8e211cd9c56c0adb249ebe1a697 /src/network/access | |
parent | 5dec3808ed6724a096e5dfc579d37e8528de75e0 (diff) | |
parent | c368a8ed6badab846c8e63c26d48b95788c12163 (diff) | |
download | Qt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.zip Qt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.tar.gz Qt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/gui/itemviews/qabstractitemview.cpp
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qnetworkcookie.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 01a743b..aaa5075 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -976,14 +976,14 @@ QList<QNetworkCookie> QNetworkCookie::parseCookies(const QByteArray &cookieStrin cookie.setExpirationDate(dt); } else if (field.first == "domain") { QByteArray rawDomain = field.second; - QString maybeLeadingDot; if (rawDomain.startsWith('.')) { - maybeLeadingDot = QLatin1Char('.'); rawDomain = rawDomain.mid(1); } - QString normalizedDomain = QUrl::fromAce(QUrl::toAce(QString::fromUtf8(rawDomain))); - cookie.setDomain(maybeLeadingDot + normalizedDomain); + // always add the dot, there are some servers that forget the + // leading dot. This is actually forbidden according to RFC 2109, + // but all browsers accept it anyway so we do that as well + cookie.setDomain(QLatin1Char('.') + normalizedDomain); } else if (field.first == "max-age") { bool ok = false; int secs = field.second.toInt(&ok); @@ -1184,7 +1184,6 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis cookie.expirationDate() < now; // validate the cookie & set the defaults if unset - // (RFC 2965: "The request-URI MUST path-match the Path attribute of the cookie.") if (cookie.path().isEmpty()) cookie.setPath(defaultPath); else if (!isParentPath(pathAndFileName, cookie.path())) |