Open alexey-malov opened 5 years ago
Protocol: 0
Domain: 127.0.0.1
Port: 80
Document: /
URL: http://127.0.0.1:80/
enum Protocol
{
HTTP,
HTTPS
};
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;