Ejemplo n.º 1
0
bool 
CVersion::FromString( const CString& versionStr )
{GUCEF_TRACE;

    m_version = StringToVersion( versionStr );
    return true;    
}
bool HTTP::ResponseDecoder::MatchStartLine (const std::string& inLine) {
    
    std::regex reInitialLine ("^HTTP/([0-9\\.0-9]+)\\s([0-9]+)");
    std::smatch matchLine;
    if (std::regex_search (inLine, matchLine, reInitialLine)) {
        
        mMessage = std::make_unique<Response> ();
        mMessage->mVersion = StringToVersion (matchLine[1].str ());
        mMessage->mCode = StringToCode (matchLine[2].str ());
        
        return true;
    }
    
    return false;
}