9 #include "qhttpserver/src/qhttprequest.h"
10 #include "qhttpserver/src/qhttpresponse.h"
11 #include "qhttpserver/src/qhttpserver.h"
12 #include "qhttpserver/src/qhttpconnection.h"
19 VFS_httpd(quint16 port, QHostAddress addr=QHostAddress::Any,
bool ssl=
false, QString sslCertPath=
"", QString sslKeyPath=
"");
36 virtual void handle(QHttpRequest *req, QHttpResponse *resp);
Holds the request and response objects for future use.
QHttpResponse * _m_resp
http response object
virtual void accumulate(const QByteArray &)
This seems to be used during an http push request.
QString _path
path component of url
void done()
signal that this responder is complete, and can be deleted
VFS_httpd_responder(QHttpRequest *req, QHttpResponse *resp)
quint64 _size
the size of the response data
QHttpRequest * _m_req
http request object
virtual QByteArray errorPage()
The default error page.
virtual ~VFS_httpd_responder()
VFS_httpd_responder destructor.
virtual void validatePath(QUrl url)
Validates the incoming path.
virtual void respond()
Send an http response back to the client.
QString _mime
mime type to send
Creates httpd server node for VFS.
VFS_httpd(quint16 port, QHostAddress addr=QHostAddress::Any, bool ssl=false, QString sslCertPath="", QString sslKeyPath="")
VFS_httpd constructor.
virtual bool isContainer()
A VFS_httpd node cannot contain children.
QHttpServer _httpd
QHttpServer instance.
virtual void createNewConnection()
The server has received a new http connection request.
virtual void handle(QHttpRequest *req, QHttpResponse *resp)
Handle an incoming http request.
void initMimes()
Initialize the mime map.
virtual bool listen()
Start listening for incoming connections.
static QHash< QString, QString > MIME_TYPES
The mime type map.
Open a listening TCP port for other clients to connect to.