summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Lysenko <lysenkoalexmail@gmail.com>2018-08-28 12:02:30 +0300
committerKai Koehne <kai.koehne@qt.io>2018-12-21 09:56:47 +0000
commitbc1b6ac5ad0ce608e3b4c7f87c2405aa595735d7 (patch)
treebec92780aee0d72aecc9759f7f8a11e48ca625cb
parenta7335b31b97267d539c3df4aaab5c088354fd1c0 (diff)
downloadqtwebsockets-bc1b6ac5ad0ce608e3b4c7f87c2405aa595735d7.tar.gz
Remove unneeded CRLF ending from status line
No need to keep the CRLF ending of status line. Task-number: QTBUG-67424 Change-Id: I7f94c7bedf40412b338c56cfe59751f6a9e78f0a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--src/websockets/qwebsocket_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 8529538..a460109 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -965,7 +965,7 @@ void QWebSocketPrivate::processHandshake(QTcpSocket *pSocket)
case ReadingStatusState:
if (!pSocket->canReadLine())
return;
- m_statusLine = pSocket->readLine();
+ m_statusLine = pSocket->readLine().trimmed();
if (Q_UNLIKELY(!parseStatusLine(m_statusLine, &m_httpMajorVersion, &m_httpMinorVersion, &m_httpStatusCode, &m_httpStatusMessage))) {
errorDescription = QWebSocket::tr("Invalid statusline in response: %1.").arg(QString::fromLatin1(m_statusLine));
break;