Compiles now.
This commit is contained in:
parent
26fb03572f
commit
8d971c1545
@ -34,7 +34,7 @@ namespace http {
|
||||
|
||||
bool HTTPHandler::processHTTPRequest(core::TCPSession *session, std::stringstream &data) {
|
||||
|
||||
HTTPSession *httpSession = static_cast<HTTPServer &>(session->server).httpSessions.findSessionByHeader(httpRequest);
|
||||
HTTPSession *httpSession = static_cast<HTTPServer&>(session->server).httpSessions.findSessionByHeader(httpRequest);
|
||||
|
||||
std::stringstream content;
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "Command.h"
|
||||
#include "TCPSession.h"
|
||||
#include "Log.h"
|
||||
#include "IMFMessage.h"
|
||||
#include "HTTPRequest.h"
|
||||
|
||||
namespace http {
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace http {
|
||||
|
||||
bool HTTPPageList::processRequest(HTTPRequest *httpRequest, core::TCPSession *session, HTTPSession *httpSession, std::stringstream &data) {
|
||||
httpRequest->response.setProtocol(httpRequest->request.getProtocol());
|
||||
httpRequest->response.setProtocol(httpRequest->request->getProtocol());
|
||||
for(auto *page : pages) {
|
||||
if(page->check(httpRequest->request.getURI())) {
|
||||
return page->processCommand(httpRequest->request.getURI(), session, httpSession, httpRequest, data);
|
||||
if(page->check(httpRequest->request->getURI())) {
|
||||
return page->processCommand(httpRequest->request->getURI(), session, httpSession, httpRequest, data);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -13,15 +13,18 @@ namespace http {
|
||||
class HTTPRequest : public coreutils::IMFMessage {
|
||||
|
||||
public:
|
||||
HTTPRequest(coreutils::PString &in);
|
||||
HTTPRequest(coreutils::PString &in) : IMFMessage(in) {
|
||||
message = new IMFMessage(in);
|
||||
}
|
||||
bool parse(coreutils::PString &in) {
|
||||
message->parse(in);
|
||||
return true;
|
||||
}
|
||||
|
||||
coreutils::IMFRequest request;
|
||||
coreutils::IMFRequest *request;
|
||||
coreutils::IMFMessage *message;
|
||||
coreutils::IMFResponse response;
|
||||
|
||||
private:
|
||||
std::string key;
|
||||
std::string value;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
BIN
HTTPServer
Executable file
BIN
HTTPServer
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user