summaryrefslogtreecommitdiffstats
path: root/src/oauth/qoauthhttpserverreplyhandler.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-05-08 20:41:42 -0700
committerThiago Macieira <thiago.macieira@intel.com>2024-05-13 11:14:57 -0700
commit1e1d989eb300d8246629174a1a91b228a8487f0f (patch)
tree16f0f5d2adc1f2fdd74cfb5c5407846465aeff40 /src/oauth/qoauthhttpserverreplyhandler.cpp
parent4e03167088181bf513adcfb8aac93fb8efb3f420 (diff)
QOAuthHttpServerReplyHandler: don't use <ctype.h>
It's locale-dependent and slow. Just use our own ascii_is_space(). I don't think the HTTP spec allows any other space than 0x20, but that's not the problem here. Pick-to: 6.7 Change-Id: Ie30a3caf09ef4176bb36fffd17cdb50d8b32b6f3 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Diffstat (limited to 'src/oauth/qoauthhttpserverreplyhandler.cpp')
-rw-r--r--src/oauth/qoauthhttpserverreplyhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/oauth/qoauthhttpserverreplyhandler.cpp b/src/oauth/qoauthhttpserverreplyhandler.cpp
index f406de3..6a0dccb 100644
--- a/src/oauth/qoauthhttpserverreplyhandler.cpp
+++ b/src/oauth/qoauthhttpserverreplyhandler.cpp
@@ -15,11 +15,11 @@
#include <QtCore/qurlquery.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qloggingcategory.h>
+#include <QtCore/private/qlocale_p.h>
#include <QtNetwork/qtcpsocket.h>
#include <QtNetwork/qnetworkreply.h>
-#include <cctype>
#include <cstring>
#include <functional>
@@ -155,7 +155,7 @@ bool QOAuthHttpServerReplyHandlerPrivate::QHttpRequest::readUrl(QTcpSocket *sock
while (socket->bytesAvailable() && !finished) {
char c;
socket->getChar(&c);
- if (std::isspace(c))
+ if (ascii_isspace(c))
finished = true;
else
fragment += c;