Merge pull request #171 from yorickdewid/master

Set cast type without dereferencing pointer
This commit is contained in:
Jaeseung Ha 2017-09-18 00:44:36 +09:00 committed by GitHub
commit 6da6579ce9
6 changed files with 54 additions and 48 deletions

View File

@ -7,9 +7,11 @@ conan_basic_setup()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(Tcmalloc)
find_package(Threads)
find_package(OpenSSL)
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
@ -28,7 +30,6 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
if (MSVC)
set(Boost_USE_STATIC_LIBS "On")
find_package( Boost 1.52 COMPONENTS system thread regex REQUIRED )
@ -48,6 +49,7 @@ include_directories("${PROJECT_SOURCE_DIR}")
#add_subdirectory(src)
add_subdirectory(examples)
if (MSVC)
else()
add_subdirectory(tests)

View File

@ -6,7 +6,6 @@ add_executable(example_vs example_vs.cpp)
target_link_libraries(example_vs ${Boost_LIBRARIES})
target_link_libraries(example_vs ${CMAKE_THREAD_LIBS_INIT})
else ()
add_executable(helloworld helloworld.cpp)
target_link_libraries(helloworld ${Boost_LIBRARIES})
target_link_libraries(helloworld ${CMAKE_THREAD_LIBS_INIT})
@ -49,7 +48,6 @@ add_custom_command(OUTPUT example_test.py
add_custom_target(example_copy ALL DEPENDS example_test.py)
add_executable(example_chat example_chat.cpp)
#target_link_libraries(example_chat crow)
target_link_libraries(example_chat ${Boost_LIBRARIES})
target_link_libraries(example_chat ${CMAKE_THREAD_LIBS_INIT})
add_custom_command(OUTPUT example_chat.html

View File

@ -86,6 +86,12 @@ namespace crow
completed_ = false;
}
void redirect(const std::string& location)
{
code = 301;
set_header("Location", location);
}
void write(const std::string& body_part)
{
body += body_part;

View File

@ -148,7 +148,7 @@ namespace crow
});
}
CROW_LOG_INFO << server_name_ << " server is running on port " << port_
CROW_LOG_INFO << server_name_ << " server is running at " << bindaddr_ <<":" << port_
<< " using " << concurrency_ << " threads";
signals_.async_wait(