1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QHTTPSERVERREQUEST_P_H
6#define QHTTPSERVERREQUEST_P_H
7
8#include <QtHttpServer/qhttpserverrequest.h>
9#include <QtNetwork/private/qhttpheaderparser_p.h>
10#include <QtCore/private/qbytedata_p.h>
11
12//
13// W A R N I N G
14// -------------
15//
16// This file is not part of the Qt API. It exists for the convenience
17// of QHttpServer. This header file may change from version to
18// version without notice, or even be removed.
19//
20// We mean it.
21
22QT_BEGIN_NAMESPACE
23
24class QHttp2Stream;
25
26class QHttpServerRequestPrivate : public QSharedData
27{
28 friend class QHttpServerParser;
29
30public:
31 QHttpServerRequestPrivate(const QHostAddress &remoteAddress, quint16 remotePort,
32 const QHostAddress &localAddress, quint16 localPort);
33#if QT_CONFIG(ssl)
34 QHttpServerRequestPrivate(const QHostAddress &remoteAddress, quint16 remotePort,
35 const QHostAddress &localAddress, quint16 localPort,
36 const QSslConfiguration &sslConfiguration);
37#endif
38 QHttpServerRequestPrivate() = default;
39 QHttpServerRequestPrivate(const QHttpServerRequestPrivate &other) = default;
40
41 QUrl url;
42 QHttpServerRequest::Method method;
43 QHttpHeaders headers;
44
45 qint64 contentLength() const;
46
47 QHostAddress remoteAddress;
48 quint16 remotePort;
49 QHostAddress localAddress;
50 quint16 localPort;
51 int majorVersion;
52 int minorVersion;
53#if QT_CONFIG(ssl)
54 QSslConfiguration sslConfiguration;
55#endif
56 QByteArray body;
57};
58
59QT_END_NAMESPACE
60
61#endif // QHTTPSERVERREQUEST_P_H
62

source code of qthttpserver/src/httpserver/qhttpserverrequest_p.h