ImbaCow / OOP

Repo for object oriented programming
0 stars 0 forks source link

Замечания по CHttpURL #13

Open alexey-malov opened 5 years ago

alexey-malov commented 5 years ago
alexey-malov commented 5 years ago
alexey-malov commented 5 years ago
Protocol: 0
Domain: 127.0.0.1
Port: 80
Document: /
URL: http://127.0.0.1:80/
alexey-malov commented 5 years ago
enum Protocol
{
    HTTP,
    HTTPS
};
alexey-malov commented 5 years ago
alexey-malov commented 5 years ago
void CHttpUrl::ParseURL(const std::string& urlString)
{
    std::string formatedUrlString = boost::trim_copy(urlString);
    std::string regexStr = (boost::format(URL_REGEX_PATTERN) % PROTOCOL_REGEX % DOMAIN_REGEX % PORT_REGEX % DOC_REGEX).str();
    std::regex reg(regexStr, std::regex_constants::icase);
    std::smatch match;