summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsockethandshakeresponse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsockethandshakeresponse.cpp')
-rw-r--r--src/websockets/qwebsockethandshakeresponse.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/websockets/qwebsockethandshakeresponse.cpp b/src/websockets/qwebsockethandshakeresponse.cpp
index d8fa5cf..a3963cd 100644
--- a/src/websockets/qwebsockethandshakeresponse.cpp
+++ b/src/websockets/qwebsockethandshakeresponse.cpp
@@ -41,6 +41,7 @@
#include <QtCore/QByteArray>
#include <QtCore/QStringList>
#include <QtCore/QDateTime>
+#include <QtCore/QLocale>
#include <QtCore/QCryptographicHash>
#include <QtCore/QSet>
#include <QtCore/QList>
@@ -178,14 +179,15 @@ QString QWebSocketHandshakeResponse::getHandshakeResponse(
} else {
if (origin.isEmpty())
origin = QStringLiteral("*");
+ QDateTime datetime = QDateTime::currentDateTimeUtc();
response << QStringLiteral("Server: ") % serverName <<
QStringLiteral("Access-Control-Allow-Credentials: false") <<
QStringLiteral("Access-Control-Allow-Methods: GET") <<
QStringLiteral("Access-Control-Allow-Headers: content-type") <<
QStringLiteral("Access-Control-Allow-Origin: ") % origin <<
- QStringLiteral("Date: ") %
- QDateTime::currentDateTimeUtc()
- .toString(QStringLiteral("ddd, dd MMM yyyy hh:mm:ss 'GMT'"));
+ QStringLiteral("Date: ") % QLocale::c()
+ .toString(datetime, QStringLiteral("ddd, dd MMM yyyy hh:mm:ss 'GMT'"));
+
m_acceptedVersion = QWebSocketProtocol::currentVersion();
m_canUpgrade = true;