From a0876ed58cbfd47b20e19be54127d4a7e843abd0 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Thu, 26 May 2022 11:59:36 +0200 Subject: [PATCH] update submodules, remove ssl crap --- CMakeLists.txt | 2 +- deps/cpp-httplib | 2 +- deps/fmt | 2 +- deps/json | 2 +- deps/sentry-native | 2 +- deps/sol2 | 2 +- deps/toml11 | 2 +- include/Http.h | 2 -- src/Http.cpp | 8 +------- src/main.cpp | 2 +- 10 files changed, 9 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d45c23..26401e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ include_directories("${PROJECT_SOURCE_DIR}/deps/cpp-httplib") include_directories("${PROJECT_SOURCE_DIR}/deps/json/single_include") include_directories("${PROJECT_SOURCE_DIR}/deps") -add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT) +add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT=1) # ------------------------ APPLE --------------------------------- if(APPLE) diff --git a/deps/cpp-httplib b/deps/cpp-httplib index b324921..47044c0 160000 --- a/deps/cpp-httplib +++ b/deps/cpp-httplib @@ -1 +1 @@ -Subproject commit b324921c1aeff2976544128e4bb2a0979a4aa595 +Subproject commit 47044c05a8587dff86ab90526daabfef61079490 diff --git a/deps/fmt b/deps/fmt index 17dda58..ce246aa 160000 --- a/deps/fmt +++ b/deps/fmt @@ -1 +1 @@ -Subproject commit 17dda58391fba627a56482f5d2652a396619bc26 +Subproject commit ce246aaf74cb7616777497da988804fa4c02bf2d diff --git a/deps/json b/deps/json index eb21824..31e2583 160000 --- a/deps/json +++ b/deps/json @@ -1 +1 @@ -Subproject commit eb2182414749825be086c825edb5229e5c28503d +Subproject commit 31e25839b6576d31bc32d5b7d08ba8a32b38f4c2 diff --git a/deps/sentry-native b/deps/sentry-native index 90966cc..0a498e3 160000 --- a/deps/sentry-native +++ b/deps/sentry-native @@ -1 +1 @@ -Subproject commit 90966cc1022b8155681b6899539b35466baccf2c +Subproject commit 0a498e3e40d37180464c8fd17058e7330c72eb7a diff --git a/deps/sol2 b/deps/sol2 index c068aef..d0eba0a 160000 --- a/deps/sol2 +++ b/deps/sol2 @@ -1 +1 @@ -Subproject commit c068aefbeddb3dd1f1fd38d42843ecb49a3b4cdb +Subproject commit d0eba0a7544b0b62e37f08972c0f431f3c0e96b4 diff --git a/deps/toml11 b/deps/toml11 index fda0a2b..e8f922a 160000 --- a/deps/toml11 +++ b/deps/toml11 @@ -1 +1 @@ -Subproject commit fda0a2b9abd16e356f777c40a675131821c71b00 +Subproject commit e8f922a1b874b110781dfb3d23d03d41ddb6666b diff --git a/include/Http.h b/include/Http.h index 35fb7b5..4850470 100644 --- a/include/Http.h +++ b/include/Http.h @@ -29,8 +29,6 @@ namespace Server { class THttpServerInstance { public: THttpServerInstance(); - static fs::path KeyFilePath; - static fs::path CertFilePath; protected: void operator()(); diff --git a/src/Http.cpp b/src/Http.cpp index 8edc249..072a8ec 100644 --- a/src/Http.cpp +++ b/src/Http.cpp @@ -151,13 +151,7 @@ Http::Server::THttpServerInstance::THttpServerInstance() { void Http::Server::THttpServerInstance::operator()() try { beammp_info("HTTP(S) Server started on port " + std::to_string(Application::Settings.HTTPServerPort)); std::unique_ptr HttpLibServerInstance; - if (Application::Settings.HTTPServerUseSSL) { - HttpLibServerInstance = std::make_unique( - reinterpret_cast(Http::Server::THttpServerInstance::CertFilePath.c_str()), - reinterpret_cast(Http::Server::THttpServerInstance::KeyFilePath.c_str())); - } else { - HttpLibServerInstance = std::make_unique(); - } + HttpLibServerInstance = std::make_unique(); // todo: make this IP agnostic so people can set their own IP HttpLibServerInstance->Get("/", [](const httplib::Request&, httplib::Response& res) { res.set_content("

Hello World!

BeamMP Server can now serve HTTP requests!

", "text/html"); diff --git a/src/main.cpp b/src/main.cpp index 5878784..9014ad7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,7 +17,7 @@ #include #include -#define CPPHTTPLIB_OPENSSL_SUPPORT 1 + static const std::string sCommandlineArguments = R"( USAGE: BeamMP-Server [arguments]