2019-07-28 10:31:56 +08:00
|
|
|
#pragma once
|
2015-07-13 16:28:09 +08:00
|
|
|
|
|
|
|
class http_servlet : public acl::HttpServlet
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
http_servlet(acl::ostream& out, acl::polarssl_conf* conf);
|
|
|
|
~http_servlet();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool doGet(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doPost(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doUnknown(acl::HttpServletRequest&,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doError(acl::HttpServletRequest&,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doConnect(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doPut(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doDelete(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doHead(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doOptions(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
2015-09-27 20:59:21 +08:00
|
|
|
bool doPropfind(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
bool doOther(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res, const char* method);
|
2015-07-13 16:28:09 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool handled_;
|
|
|
|
acl::string url_;
|
|
|
|
acl::ostream& out_;
|
|
|
|
acl::polarssl_conf* client_ssl_conf_;
|
|
|
|
|
|
|
|
void logger_request(acl::HttpServletRequest& req);
|
|
|
|
};
|