enable logging
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1add0ab..07f9712 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,7 +134,7 @@
include_directories(${DBUS_INCLUDE_DIRS})
# Crow
-add_definitions(-DCROW_DISABLE_LOGGING)
+#add_definitions(-DCROW_DISABLE_LOGGING)
add_definitions(-DCROW_ENABLE_SSL)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/crow/include)
@@ -208,6 +208,7 @@
# googletest
enable_testing()
+
#hunter_add_package(GTest)
add_subdirectory(googletest)
#find_package(GMock CONFIG REQUIRED)
@@ -216,6 +217,7 @@
target_link_libraries(unittest gmock gtest)
target_link_libraries(unittest pthread)
target_link_libraries(unittest OpenSSL::SSL OpenSSL::Crypto)
+ target_link_libraries(unittest ssl crypto)
target_link_libraries(unittest g3logger)
target_link_libraries(unittest ${ZLIB_LIBRARIES})
add_dependencies(unittest packagestaticcpp)
@@ -228,6 +230,7 @@
add_executable(bmcweb ${WEBSERVER_MAIN} ${HDR_FILES} ${SRC_FILES})
target_link_libraries(bmcweb pthread)
target_link_libraries(bmcweb OpenSSL::SSL OpenSSL::Crypto)
+target_link_libraries(unittest ssl crypto)
target_link_libraries(bmcweb g3logger)
target_link_libraries(bmcweb ${ZLIB_LIBRARIES})
add_dependencies(bmcweb packagestaticcpp)
diff --git a/crow/include/crow/socket_adaptors.h b/crow/include/crow/socket_adaptors.h
index 34bf801..c55e4d5 100644
--- a/crow/include/crow/socket_adaptors.h
+++ b/crow/include/crow/socket_adaptors.h
@@ -84,6 +84,9 @@
fail, because the adapter is gone. As is, do_read beleives the parse
failed, because is_open now returns False (which could also mean the client
disconnected during parse)
+ UPdate: The parser does in fact have an "is_upgrade" method that is intended
+ for exactly this purpose. Todo is now to make do_read obey the flag
+ appropriately.
*/
if (ssl_socket_ != nullptr) {
return ssl_socket_->lowest_layer().is_open();
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 82b83a7..027c926 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -310,9 +310,12 @@
return j;
});
-
+ LOG(DEBUG) << "Building SSL context";
auto ssl_context = ensuressl::get_ssl_context(ssl_pem_file);
- app.port(18080)
+ int port = 18080;
+
+ LOG(DEBUG) << "Starting webserver on port " << port;
+ app.port(port)
//.ssl(std::move(ssl_context))
//.concurrency(4)
.run();