DUNE: Uniform Navigational Environment
2019.02.1
|
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(), and ~RequestHandler().
|
virtual |
References sendResponse404().
Referenced by handleRequest(), and ~RequestHandler().
|
virtual |
References sendResponse404().
Referenced by handleRequest(), and ~RequestHandler().
void Transports::HTTP::RequestHandler::handleRequest | ( | TCPSocket * | sock | ) |
References handleGET(), handlePOST(), and handlePUT().
Referenced by Transports::HTTP::Handler::Handler(), and sendData().
void Transports::HTTP::RequestHandler::sendData | ( | TCPSocket * | sock, |
const char * | data, | ||
int | size, | ||
HeaderFieldsMap * | hdr_fields = 0 |
||
) |
References sendHeader().
Referenced by sendData(), and sendResponse404().
|
inline |
References handleRequest(), sendData(), and sendFile().
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 sendData().
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().
Referenced by ~RequestHandler().
void Transports::HTTP::RequestHandler::sendResponse200 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by ~RequestHandler().
void Transports::HTTP::RequestHandler::sendResponse201 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by ~RequestHandler().
void Transports::HTTP::RequestHandler::sendResponse403 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by ~RequestHandler().
void Transports::HTTP::RequestHandler::sendResponse404 | ( | TCPSocket * | sock, |
const std::string & | message | ||
) |
References sendHeader().
Referenced by handleGET(), handlePOST(), handlePUT(), sendFile(), sendResponse404(), and ~RequestHandler().
|
inline |
References sendData(), sendResponse404(), sendResponse416(), sendResponse500(), and sendResponse503().
void Transports::HTTP::RequestHandler::sendResponse416 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by sendFile(), and sendResponse404().
void Transports::HTTP::RequestHandler::sendResponse500 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by sendResponse404().
void Transports::HTTP::RequestHandler::sendResponse503 | ( | TCPSocket * | sock | ) |
References sendHeader().
Referenced by sendResponse404().