summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkcookie.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index 0c132866f..6884beee9 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -504,7 +504,12 @@ QByteArray QNetworkCookie::toRawForm(RawForm form) const
}
if (!d->domain.isEmpty()) {
result += "; domain=";
- result += QUrl::toAce(d->domain);
+ QString domainNoDot = d->domain;
+ if (domainNoDot.startsWith(QLatin1Char('.'))) {
+ result += '.';
+ domainNoDot = domainNoDot.mid(1);
+ }
+ result += QUrl::toAce(domainNoDot);
}
if (!d->path.isEmpty()) {
result += "; path=";