25 lines
732 B
C++
25 lines
732 B
C++
#include "HTTPPageList.h"
|
|
|
|
namespace http {
|
|
|
|
bool HTTPPageList::processRequest(HTTPRequest *httpRequest,
|
|
core::TCPSession *session,
|
|
HTTPSession *httpSession,
|
|
std::stringstream &data) {
|
|
|
|
httpRequest->response.setProtocol(httpRequest->request.getProtocol());
|
|
coreutils::ZString uri = httpRequest->request.getURI();
|
|
HTTPPage *page = pages[uri.str()];
|
|
return page->processCommand(httpRequest, session, httpSession, data);
|
|
}
|
|
|
|
void HTTPPageList::add(HTTPPage &page, std::string name) {
|
|
pages.insert(std::make_pair(name, &page));
|
|
}
|
|
|
|
void HTTPPageList::remove(HTTPPage &page) {}
|
|
|
|
}
|
|
|
|
|