From 7e71019a8c0bd43e3162b80c1200558f7b64b15f Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Thu, 24 Sep 2026 13:05:03 +0200 Subject: [PATCH 1/2] fix(ApacheConnector): do not start the module definition with the module keyword #5501 In C++20 a line that begins with module and a name is a module directive, which clang rejects. The declaration above already gives it C linkage. --- ApacheConnector/src/ApacheConnector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApacheConnector/src/ApacheConnector.cpp b/ApacheConnector/src/ApacheConnector.cpp index 7d3b90e48a..66ce690f96 100644 --- a/ApacheConnector/src/ApacheConnector.cpp +++ b/ApacheConnector/src/ApacheConnector.cpp @@ -303,7 +303,7 @@ extern "C" const command_rec ApacheConnector_cmds[] = }; -module AP_MODULE_DECLARE_DATA poco_module = +extern "C" module AP_MODULE_DECLARE_DATA poco_module = { STANDARD20_MODULE_STUFF, nullptr, From c8c5b439346492891f28088eed73442c855e4f16 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Thu, 24 Sep 2026 13:05:28 +0200 Subject: [PATCH 2/2] fix(ApacheConnector): compare the request scheme by content in secure() #5501 The scheme was compared with a string literal by address, so secure() returned false for HTTPS requests. --- ApacheConnector/src/ApacheConnector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ApacheConnector/src/ApacheConnector.cpp b/ApacheConnector/src/ApacheConnector.cpp index 66ce690f96..a6dbf7db93 100644 --- a/ApacheConnector/src/ApacheConnector.cpp +++ b/ApacheConnector/src/ApacheConnector.cpp @@ -14,6 +14,7 @@ #include "ApacheServerResponse.h" #include "ApacheRequestHandlerFactory.h" #include "Poco/Net/HTTPRequestHandler.h" +#include #include #include "httpd.h" #include "http_connection.h" @@ -133,7 +134,8 @@ int ApacheRequestRec::sendFile(const std::string& path, unsigned int fileSize, c bool ApacheRequestRec::secure() { - return DEFAULT_HTTPS_PORT == ap_default_port(_pRec) && ap_http_scheme(_pRec) == "https"; + const char* scheme = ap_http_scheme(_pRec); + return DEFAULT_HTTPS_PORT == ap_default_port(_pRec) && scheme != nullptr && std::strcmp(scheme, "https") == 0; }