SNode.C
|
Functions | |
static int | from_hex (int ch) |
std::string | url_decode (const std::string &text) |
std::string | url_encode (const std::string &text) |
std::string & | str_trimm (std::string &text) |
std::pair< std::string, std::string > | str_split (const std::string &base, char c_middle) |
std::pair< std::string, std::string > | str_split_last (const std::string &base, char c_middle) |
std::string | to_http_date (struct tm *tm) |
struct tm | from_http_date (const std::string &http_date) |
std::string | file_mod_http_date (const std::string &filePath) |
std::string::iterator | to_lower (std::string &string) |
std::string | toString (const std::string &method, const std::string &url, const std::string &version, const web::http::CiStringMap< std::string > &queries, const web::http::CiStringMap< std::string > &header, const web::http::CiStringMap< std::string > &cookies, const std::vector< char > &body) |
std::string | toString (const std::string &version, const std::string &statusCode, const std::string &reason, const web::http::CiStringMap< std::string > &header, const web::http::CiStringMap< web::http::CookieOptions > &cookies, const std::vector< char > &body) |
std::string httputils::file_mod_http_date | ( | const std::string & | filePath | ) |
Definition at line 166 of file http_utils.cpp.
Referenced by web::http::client::Request::executeSendFile(), and web::http::server::Response::sendFile().
|
static |
Definition at line 62 of file http_utils.cpp.
Referenced by url_decode().
struct tm httputils::from_http_date | ( | const std::string & | http_date | ) |
Definition at line 157 of file http_utils.cpp.
std::pair< std::string, std::string > httputils::str_split | ( | const std::string & | base, |
char | c_middle | ||
) |
Definition at line 112 of file http_utils.cpp.
Referenced by web::http::Parser::analyzeHeader(), web::http::client::ResponseParser::analyzeHeader(), web::http::server::RequestParser::analyzeHeader(), express::middleware::BasicAuthentication::BasicAuthentication(), web::websocket::server::SocketContextUpgradeFactory::create(), web::http::client::ResponseParser::parseStartLine(), web::http::server::RequestParser::parseStartLine(), web::http::client::SocketContextUpgradeFactorySelector::select(), web::http::server::SocketContextUpgradeFactorySelector::select(), and web::http::decoder::Fields::splitLine().
std::pair< std::string, std::string > httputils::str_split_last | ( | const std::string & | base, |
char | c_middle | ||
) |
Definition at line 126 of file http_utils.cpp.
Referenced by express::Request::extend().
std::string & httputils::str_trimm | ( | std::string & | text | ) |
Definition at line 105 of file http_utils.cpp.
Referenced by web::http::Parser::analyzeHeader(), web::http::client::ResponseParser::analyzeHeader(), web::http::server::RequestParser::analyzeHeader(), web::websocket::server::SocketContextUpgradeFactory::create(), web::http::client::SocketContextUpgradeFactorySelector::select(), web::http::server::SocketContextUpgradeFactorySelector::select(), and web::http::decoder::Fields::splitLine().
std::string httputils::to_http_date | ( | struct tm * | tm | ) |
Definition at line 140 of file http_utils.cpp.
References utils::system::gmtime(), and utils::system::time().
Referenced by web::http::server::Response::clearCookie(), web::http::client::Request::executeSendHeader(), and web::http::server::Response::sendHeader().
std::string::iterator httputils::to_lower | ( | std::string & | string | ) |
Definition at line 178 of file http_utils.cpp.
Referenced by web::http::client::SocketContextUpgradeFactorySelector::select(), web::http::client::SocketContextUpgradeFactorySelector::select(), and web::http::server::SocketContextUpgradeFactorySelector::select().
std::string httputils::toString | ( | const std::string & | method, |
const std::string & | url, | ||
const std::string & | version, | ||
const web::http::CiStringMap< std::string > & | queries, | ||
const web::http::CiStringMap< std::string > & | header, | ||
const web::http::CiStringMap< std::string > & | cookies, | ||
const std::vector< char > & | body | ||
) |
Definition at line 182 of file http_utils.cpp.
References utils::hexDump().
Referenced by express::middleware::VerboseRequest::VerboseRequest().
std::string httputils::toString | ( | const std::string & | version, |
const std::string & | statusCode, | ||
const std::string & | reason, | ||
const web::http::CiStringMap< std::string > & | header, | ||
const web::http::CiStringMap< web::http::CookieOptions > & | cookies, | ||
const std::vector< char > & | body | ||
) |
Definition at line 253 of file http_utils.cpp.
References web::http::CookieOptions::getOptions(), web::http::CookieOptions::getValue(), and utils::hexDump().
std::string httputils::url_decode | ( | const std::string & | text | ) |
Definition at line 66 of file http_utils.cpp.
References from_hex().
Referenced by express::Request::extend().
std::string httputils::url_encode | ( | const std::string & | text | ) |
Definition at line 87 of file http_utils.cpp.
Referenced by web::http::client::Request::executeSendHeader().