DUNE: Uniform Navigational Environment
2016.05.0
|
Public Types | |
typedef std::map< std::string, std::string > | HeaderFieldsMap |
Public Member Functions | |
RequestHandler (void) | |
virtual | ~RequestHandler (void) |
virtual void | handleGET (TCPSocket *sock, Utils::TupleList &headers, const char *uri) |
virtual void | handlePOST (TCPSocket *sock, Utils::TupleList &headers, const char *uri) |
virtual void | handlePUT (TCPSocket *sock, Utils::TupleList &headers, const char *uri) |
void | sendHeader (TCPSocket *sock, const char *status_line, int64_t length, HeaderFieldsMap *hdr_fields=0) |
void | sendResponse100 (TCPSocket *sock) |
void | sendResponse201 (TCPSocket *sock) |
void | sendResponse200 (TCPSocket *sock) |
void | sendResponse403 (TCPSocket *sock) |
void | sendResponse404 (TCPSocket *sock, const std::string &message) |
void | sendResponse404 (TCPSocket *sock) |
void | sendResponse416 (TCPSocket *sock) |
void | sendResponse500 (TCPSocket *sock) |
void | sendResponse503 (TCPSocket *sock) |
void | sendData (TCPSocket *sock, const char *data, int size, HeaderFieldsMap *hdr_fields=0) |
void | sendData (TCPSocket *sock, const std::string &data, HeaderFieldsMap *hdr_fields=0) |
void | sendFile (TCPSocket *sock, const std::string &file, HeaderFieldsMap &hdr_fields, int64_t off_beg=-1, int64_t off_end=-1) |
void | handleRequest (TCPSocket *sock) |
typedef std::map<std::string, std::string> Transports::HTTP::RequestHandler::HeaderFieldsMap |
|
inline |
|
inlinevirtual |
|
virtual |
References sendResponse404().
Referenced by handleRequest().
|
virtual |
References sendResponse404().
Referenced by handleRequest().
|
virtual |
References sendResponse404().
Referenced by handleRequest().
void Transports::HTTP::RequestHandler::handleRequest | ( | TCPSocket * | sock | ) |
References handleGET(), handlePOST(), and handlePUT().
void Transports::HTTP::RequestHandler::sendData | ( | TCPSocket * | sock, |
const char * | data, | ||
int | size, | ||
HeaderFieldsMap * | hdr_fields = 0 |
||
) |
|
inline |
References sendData().
void Transports::HTTP::RequestHandler::sendFile | ( | TCPSocket * | sock, |
const std::string & | file, | ||
HeaderFieldsMap & | hdr_fields, | ||
int64_t | off_beg = -1 , |
||
int64_t | off_end = -1 |
||
) |
References sendHeader(), sendResponse404(), and sendResponse416().
Referenced by Transports::HTTP::Task::sendStaticFile().
void Transports::HTTP::RequestHandler::sendHeader | ( | TCPSocket * | sock, |
const char * | status_line, | ||
int64_t | length, | ||
HeaderFieldsMap * | hdr_fields = 0 |
||
) |
void Transports::HTTP::RequestHandler::sendResponse100 | ( | TCPSocket * | sock | ) |
References sendHeader().
void Transports::HTTP::RequestHandler::sendResponse200 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by Transports::HTTP::Task::handlePowerChannel(), and Transports::HTTP::Task::setTime().
void Transports::HTTP::RequestHandler::sendResponse201 | ( | TCPSocket * | sock | ) |
References sendHeader().
void Transports::HTTP::RequestHandler::sendResponse403 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by Transports::HTTP::Task::handlePOST(), and Transports::HTTP::Task::handlePUT().
void Transports::HTTP::RequestHandler::sendResponse404 | ( | TCPSocket * | sock, |
const std::string & | message | ||
) |
References sendHeader().
Referenced by handleGET(), Transports::HTTP::Task::handleGET(), handlePOST(), handlePUT(), sendFile(), and sendResponse404().
|
inline |
References sendResponse404().
void Transports::HTTP::RequestHandler::sendResponse416 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by sendFile().
void Transports::HTTP::RequestHandler::sendResponse500 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by Transports::HTTP::Task::handlePowerChannel(), and Transports::HTTP::Task::setTime().
void Transports::HTTP::RequestHandler::sendResponse503 | ( | TCPSocket * | sock | ) |
References sendHeader().