summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <marten.nordheim@qt.io>2022-07-01 16:31:36 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2022-07-05 11:34:34 +0000
commit0abd9ba438698bec9588a0fb59073b6fab642f92 (patch)
tree61d127303ee6368e15460eb9c968ed677f6b2e33 /src
parent1d7001aa51604c480ccb71117ed353bb1d95aae5 (diff)
downloadqtwebsockets-0abd9ba438698bec9588a0fb59073b6fab642f92.tar.gz
Handshake: Pass max header field size to the parser
Following e3ea1d02e6a2cbc63e8ae6fff6ccae49258fe5a2 the defaults values are a lot higher and can be externally adjusted. So, we pass our limits to the parser. Pick-to: dev 6.3 Change-Id: I712c0b59a171ee1e1f9be7879670836bff8392f7 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsockethandshakerequest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/websockets/qwebsockethandshakerequest.cpp b/src/websockets/qwebsockethandshakerequest.cpp
index c0b9ee7..80683f4 100644
--- a/src/websockets/qwebsockethandshakerequest.cpp
+++ b/src/websockets/qwebsockethandshakerequest.cpp
@@ -197,6 +197,7 @@ static void appendCommmaSeparatedLineToList(QStringList &list, QByteArrayView li
void QWebSocketHandshakeRequest::readHandshake(QByteArrayView header, int maxHeaderLineLength)
{
clear();
+ m_parser.setMaxHeaderFieldSize(maxHeaderLineLength);
QString requestLine = QString::fromLatin1(readLine(header, maxHeaderLineLength));
if (requestLine.isNull()) {
clear();