From 89c5e4e6e65dc582987bdea426f3eea329bb79ce Mon Sep 17 00:00:00 2001 From: antao Date: Fri, 18 Jan 2019 10:28:58 +0800 Subject: [PATCH] Minor edits --- get_version.sh | 4 ++-- lib/src/HttpAppFrameworkImpl.h | 21 ++++++++++----------- trantor | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/get_version.sh b/get_version.sh index 0e1b4d42..918ca54b 100755 --- a/get_version.sh +++ b/get_version.sh @@ -1,7 +1,7 @@ #!/bin/sh -GIT_VER=`git log|grep ^commit|wc -l|sed -e "s/^ *//"` -MD5=`git log|head -1|awk '{printf $2}'` +GIT_VER=$(git log|grep ^commit|wc -l|sed -e "s/^ *//") +MD5=$(git log|head -1|awk '{printf $2}') TMP_FILE=/tmp/version echo "#define VERSION \"0.9.15.$GIT_VER\"" > ${TMP_FILE} echo "#define VERSION_MD5 \"$MD5\"" >> ${TMP_FILE} diff --git a/lib/src/HttpAppFrameworkImpl.h b/lib/src/HttpAppFrameworkImpl.h index a64c656f..53b56d66 100644 --- a/lib/src/HttpAppFrameworkImpl.h +++ b/lib/src/HttpAppFrameworkImpl.h @@ -128,8 +128,6 @@ class HttpAppFrameworkImpl : public HttpAppFramework const internal::HttpBinderBasePtr &binder, const std::vector &validMethods = std::vector(), const std::vector &filters = std::vector()) override; - - std::vector> _listeners; void onAsyncRequest(const HttpRequestImplPtr &req, const std::function &callback); void onNewWebsockRequest(const HttpRequestImplPtr &req, const std::function &callback, @@ -142,15 +140,6 @@ class HttpAppFrameworkImpl : public HttpAppFramework const internal::HttpBinderBasePtr &binder, const std::vector &validMethods, const std::vector &filters); - //if uuid package found,we can use a uuid string as session id; - //set _sessionTimeout=0 to make location session valid forever based on cookies; - size_t _sessionTimeout = 0; - size_t _idleConnectionTimeout = 60; - bool _useSession = false; - typedef std::shared_ptr SessionPtr; - std::unique_ptr> _sessionMapPtr; - std::unique_ptr> _responseCachingMap; - void doFilterChain(const std::shared_ptr>> &chain, const HttpRequestImplPtr &req, const std::function &callback, @@ -158,6 +147,16 @@ class HttpAppFrameworkImpl : public HttpAppFramework const std::string &session_id, const std::function &missCallback); + //We use a uuid string as session id; + //set _sessionTimeout=0 to make location session valid forever based on cookies; + size_t _sessionTimeout = 0; + size_t _idleConnectionTimeout = 60; + bool _useSession = false; + std::vector> _listeners; + typedef std::shared_ptr SessionPtr; + std::unique_ptr> _sessionMapPtr; + std::unique_ptr> _responseCachingMap; + HttpSimpleControllersRouter _httpSimpleCtrlsRouter; HttpControllersRouter _httpCtrlsRouter; WebsocketControllersRouter _websockCtrlsRouter; diff --git a/trantor b/trantor index c0e226fd..f18818de 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit c0e226fdd4cd1bab383d2f3601786d6eaf5474d8 +Subproject commit f18818dea97d2ee8e7f60a10d2f289b9cecbd6e6