summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsockethandshakerequest_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsockethandshakerequest_p.h')
-rw-r--r--src/websockets/qwebsockethandshakerequest_p.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/websockets/qwebsockethandshakerequest_p.h b/src/websockets/qwebsockethandshakerequest_p.h
index c5e9c44..d3681a9 100644
--- a/src/websockets/qwebsockethandshakerequest_p.h
+++ b/src/websockets/qwebsockethandshakerequest_p.h
@@ -54,6 +54,7 @@
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QUrl>
+#include <QtNetwork/private/qhttpheaderparser_p.h>
#include "qwebsocketprotocol.h"
@@ -74,7 +75,8 @@ public:
int port() const;
bool isSecure() const;
bool isValid() const;
- QMultiMap<QString, QString> headers() const;
+ QList<QPair<QByteArray, QByteArray>> headers() const;
+ bool hasHeader(const QByteArray &name) const;
QList<QWebSocketProtocol::Version> versions() const;
QString key() const;
QString origin() const;
@@ -84,14 +86,14 @@ public:
QString resourceName() const;
QString host() const;
- void readHandshake(QTextStream &textStream, int maxHeaderLineLength, int maxHeaders);
+ void readHandshake(QByteArrayView header, int maxHeaderLineLength);
private:
int m_port;
bool m_isSecure;
bool m_isValid;
- QMultiMap<QString, QString> m_headers;
+ QHttpHeaderParser m_parser;
QList<QWebSocketProtocol::Version> m_versions;
QString m_key;
QString m_origin;