MythTV master
mythhttprequest.h
Go to the documentation of this file.
1#ifndef MYTHHTTPREQUEST_H
2#define MYTHHTTPREQUEST_H
3
4// Qt
5#include <QUrl>
6
7// MythTV
9
10class QTcpSocket;
11
13{
14 public:
15 MythHTTPRequest(const MythHTTPConfig& Config, QString Method,
16 HTTPHeaders Headers, HTTPData Content, QTcpSocket* Socket = nullptr);
17
18 QString m_serverName;
19 QString m_method;
20 HTTPHeaders m_headers { nullptr };
21 HTTPData m_content { nullptr };
22
24 QUrl m_url;
25 QString m_root;
26 QString m_path;
27 QString m_fileName;
32 std::chrono::milliseconds m_timeout { HTTP_SOCKET_TIMEOUT_MS };
33 int m_allowed { HTTP_DEFAULT_ALLOWED };
34 QHostAddress m_peerAddress;
35
36 private:
37 Q_DISABLE_COPY(MythHTTPRequest)
38 static HTTPQueries ParseQuery(const QString& Query);
39};
40
41#endif
Limited parsing of HTTP method and some headers to determine validity of request.
HTTPQueries m_queries
QHostAddress m_peerAddress
#define MBASE_PUBLIC
Definition: mythbaseexp.h:8
MythHTTPStatus
@ HTTPBadRequest
MythHTTPConnection
@ HTTPConnectionClose
std::shared_ptr< HTTPMap > HTTPHeaders
Definition: mythhttptypes.h:36
MythHTTPRequestType
Definition: mythhttptypes.h:91
@ HTTPUnknown
Definition: mythhttptypes.h:92
MythHTTPVersion
Definition: mythhttptypes.h:83
@ HTTPUnknownVersion
Definition: mythhttptypes.h:84
std::shared_ptr< MythHTTPData > HTTPData
Definition: mythhttptypes.h:37
HTTPMap HTTPQueries
Definition: mythhttptypes.h:35
#define HTTP_DEFAULT_ALLOWED
#define HTTP_SOCKET_TIMEOUT_MS
Definition: mythhttptypes.h:25