10 #include <QHostAddress> 15 #include <QTemporaryFile> 73 void readFromSocket(QTcpSocket* socket);
82 QByteArray getMethod()
const;
85 QByteArray getPath()
const;
88 const QByteArray& getRawPath()
const;
91 QByteArray getVersion()
const;
99 QByteArray getHeader(
const QByteArray& name)
const;
105 QList<QByteArray> getHeaders(
const QByteArray& name)
const;
111 QMultiMap<QByteArray,QByteArray> getHeaderMap()
const;
119 QByteArray getParameter(
const QByteArray& name)
const;
125 QList<QByteArray> getParameters(
const QByteArray& name)
const;
128 QMultiMap<QByteArray,QByteArray> getParameterMap()
const;
131 QByteArray getBody()
const;
139 static QByteArray urlDecode(
const QByteArray source);
149 QTemporaryFile* getUploadedFile(
const QByteArray fieldName)
const;
155 QByteArray getCookie(
const QByteArray& name)
const;
158 QMap<QByteArray,QByteArray>& getCookieMap();
165 QHostAddress getPeerAddress()
const;
224 void parseMultiPartFile();
227 void readRequest(QTcpSocket* socket);
230 void readHeader(QTcpSocket* socket);
233 void readBody(QTcpSocket* socket);
236 void decodeRequestParams();
239 void extractCookies();
250 #endif // HTTPREQUEST_H
QTemporaryFile * tempFile
QMultiMap< QByteArray, QByteArray > parameters
QMultiMap< QByteArray, QByteArray > headers
QMap< QByteArray, QByteArray > cookies
QMap< QByteArray, QTemporaryFile * > uploadedFiles