2019-07-28 10:31:56 +08:00
|
|
|
#pragma once
|
2017-05-16 23:22:07 +08:00
|
|
|
|
|
|
|
class http_servlet : public acl::HttpServlet
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
http_servlet(acl::socket_stream* stream, acl::session* session);
|
|
|
|
~http_servlet();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool doError(acl::HttpServletRequest&,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
virtual bool doOther(acl::HttpServletRequest&,
|
|
|
|
acl::HttpServletResponse& res, const char* method);
|
|
|
|
virtual bool doGet(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
virtual bool doPost(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool replyf(acl::HttpServletRequest& req,
|
|
|
|
acl::HttpServletResponse& res,
|
|
|
|
const char* fmt, ...);
|
|
|
|
};
|