diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e6e4ec8..f1170aad 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,9 @@ project (DROGON CXX) -EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g'" OUTPUT_VARIABLE version) +EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g' | sed s'/-.*//g'" OUTPUT_VARIABLE version) MESSAGE(STATUS "This is gcc version:: " ${version}) -if(version LESS 4.7.0) +if(version LESS 4.9.0) MESSAGE(STATUS "gcc is too old") stop() elseif (version LESS 6.1.0) diff --git a/lib/src/HttpAppFramework.cc b/lib/src/HttpAppFramework.cc index 2fab8cde..bd8d811a 100755 --- a/lib/src/HttpAppFramework.cc +++ b/lib/src/HttpAppFramework.cc @@ -150,7 +150,7 @@ void HttpAppFrameworkImpl::initRegex() { for(auto binder:_apiCtrlVector) { std::regex reg("\\(\\[\\^/\\]\\*\\)"); - std::string tmp=std::regex_replace(binder.pathParameterPattern,reg,std::string("[^/]*")); + std::string tmp=std::regex_replace(binder.pathParameterPattern,reg,"[^/]*"); regString.append("(").append(tmp).append(")|"); } if(regString.length()>0) @@ -227,7 +227,7 @@ void HttpAppFrameworkImpl::addApiPath(const std::string &path, _binder.queryParametersPlaces=std::move(parametersPlaces); _binder.binderPtr=binder; _binder.filtersName=filters; - _binder.pathParameterPattern=std::regex_replace(originPath,regex,std::string("([^/]*)")); + _binder.pathParameterPattern=std::regex_replace(originPath,regex,"([^/]*)"); std::lock_guard guard(_apiCtrlMutex); _apiCtrlVector.push_back(std::move(_binder)); } diff --git a/trantor b/trantor index 4bcf7b3c..6c401f8f 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 4bcf7b3ce13f011d05dedf406a1975b2881e43ca +Subproject commit 6c401f8f83b94d60c2dca60e481cab1a786485e4