diff options
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 2 |
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; |