summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorBenjamin C Meyer <benjamin.meyer@torchmobile.com>2009-03-30 18:45:50 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-03-30 18:47:09 +0200
commitca119ee4b440c1ebbd456417a60167e2998de4d9 (patch)
treee654c91c8c8e748fcc2af651d0eeeedff1b07027 /src/network
parente475c68f22732553caad350608f2539db7694979 (diff)
Fix the parsing of October dates.
The code was looking for a 't' to detect GMT-nnnn. It should really be checking for 'gmt'. Signed-off-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkcookie.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp
index fed0afce12..b82d8f9246 100644
--- a/src/network/access/qnetworkcookie.cpp
+++ b/src/network/access/qnetworkcookie.cpp
@@ -636,8 +636,6 @@ static QDateTime parseDateString(const QByteArray &dateString)
qDebug() << "Month:" << month;
#endif
at += 3;
- if (at < dateString.length() && dateString[at] == '-')
- ++at;
continue;
}
// Zone
@@ -659,7 +657,10 @@ static QDateTime parseDateString(const QByteArray &dateString)
&& (at == 0
|| isWhitespace(dateString[at - 1])
|| dateString[at - 1] == ','
- || (dateString[at - 1] == 't'))) {
+ || (at >= 3
+ && (dateString[at - 3] == 'g')
+ && (dateString[at - 2] == 'm')
+ && (dateString[at - 1] == 't')))) {
int end = 1;
while (end < 5 && dateString.length() > at+end