X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/802f79cdb0d688127b8a639cd3173d801a1466cd..a5ce0f929d3f4b2e8a06cc4cbaabb20a889cd039:/Server/src/request.cpp?ds=inline diff --git a/Server/src/request.cpp b/Server/src/request.cpp index 92bb7e1..f40c9f9 100644 --- a/Server/src/request.cpp +++ b/Server/src/request.cpp @@ -34,28 +34,38 @@ # include #endif // DEBUG -using namespace PlaQui::Server; +const std::string +PlaQui::Server::Request::CHARS_DIGIT = "0123456789"; -const std::string Request::CHARS_DIGIT = "0123456789"; +const std::string +PlaQui::Server::Request::CHARS_LOWALPHA = "abcdefghijklmnopqrstuvwxyz"; -const std::string Request::CHARS_LOWALPHA = "abcdefghijklmnopqrstuvwxyz"; +const std::string +PlaQui::Server::Request::CHARS_UPALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -const std::string Request::CHARS_UPALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const std::string +PlaQui::Server::Request::CHARS_ALPHA = CHARS_LOWALPHA + CHARS_UPALPHA; -const std::string Request::CHARS_ALPHA = CHARS_LOWALPHA + CHARS_UPALPHA; +const std::string +PlaQui::Server::Request::CHARS_ALPHANUM = CHARS_DIGIT + CHARS_ALPHA; -const std::string Request::CHARS_ALPHANUM = CHARS_DIGIT + CHARS_ALPHA; +const std::string +PlaQui::Server::Request::CHARS_RESERVED = ";/?:@&=+$,"; -const std::string Request::CHARS_RESERVED = ";/?:@&=+$,"; +const std::string +PlaQui::Server::Request::CHARS_MARK = "-_.!~*'()"; -const std::string Request::CHARS_MARK = "-_.!~*'()"; +const std::string +PlaQui::Server::Request::CHARS_UNRESERVED = CHARS_ALPHANUM + CHARS_MARK; -const std::string Request::CHARS_UNRESERVED = CHARS_ALPHANUM + CHARS_MARK; +const std::string +PlaQui::Server::Request::CHARS_HEX = CHARS_DIGIT + std::string("abcdefABCDEF"); -const std::string Request::CHARS_HEX = CHARS_DIGIT + std::string("abcdefABCDEF"); +PlaQui::Server::Request::~Request(void) { +} -void Request::set_request(const std::string& req, const std::string& host, - unsigned port) { +void PlaQui::Server::Request::set_request(const std::string& req, + const std::string& host, unsigned port) { #ifdef DEBUG std::cerr << __FILE__ << ": req = " << req << " | host = " << host << " | port = " << port << std::endl; @@ -120,7 +130,7 @@ void Request::set_request(const std::string& req, const std::string& host, (*this)["SCRIPT_NAME"] = request.substr(0, pos); } -void Request::parse_header(const std::string& header) { +void PlaQui::Server::Request::parse_header(const std::string& header) { #ifdef DEBUG std::cerr << __FILE__ << ": header = " << header << std::endl; #endif // DEBUG