diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-11-11 11:25:03 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-11-11 11:25:03 (GMT) |
commit | b111d0bb1f0483d507c758810a0f247cb8dd82c0 (patch) | |
tree | 9db9a693360c607a53d1ec8c3c421b338fb53fef /src/network/access/qnetworkcookie.cpp | |
parent | 3e2c214dc217ac677733e2a56ac9f17ff0c3196f (diff) | |
parent | 95db13345cd7b6b7cac8725fe2879aaf80233818 (diff) | |
download | Qt-b111d0bb1f0483d507c758810a0f247cb8dd82c0.zip Qt-b111d0bb1f0483d507c758810a0f247cb8dd82c0.tar.gz Qt-b111d0bb1f0483d507c758810a0f247cb8dd82c0.tar.bz2 |
Merge commit 'origin/4.6' into 4.6-ce
Diffstat (limited to 'src/network/access/qnetworkcookie.cpp')
-rw-r--r-- | src/network/access/qnetworkcookie.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 73a8703..7dfb7af 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -984,14 +984,14 @@ QList<QNetworkCookie> QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt 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))); - // 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); + cookie.setDomain(maybeLeadingDot + normalizedDomain); } else if (field.first == "max-age") { bool ok = false; int secs = field.second.toInt(&ok); |