HTTPServer/HTTPPage.h
2020-12-09 09:40:32 -08:00

40 lines
909 B
C++

#ifndef __HTTPPage_h__
#define __HTTPPage_h__
#include "HTTPSession.h"
#include "HTTPRequest.h"
#include "TCPSession.h"
#include "Log.h"
namespace http {
class HTTPPage : public core::Object {
public:
bool check(std::string request) {
if(request != "") {
if(request.find("?") != -1)
request = request.substr(0, request.find("?"));
if(name.length() > 0) {
if(name == request)
return true;
}
return false;
}
return false;
}
virtual int processCommand(std::string request,
core::TCPSession *session,
HTTPSession *httpSession,
HTTPRequest *httpRequest,
std::stringstream &data) {
return false;
}
};
}
#endif