]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : improve error message when HTTPS is missing but required (#18987)
authorAdrien Gallouët <redacted>
Wed, 21 Jan 2026 16:58:38 +0000 (17:58 +0100)
committerGitHub <redacted>
Wed, 21 Jan 2026 16:58:38 +0000 (17:58 +0100)
Signed-off-by: Adrien Gallouët <redacted>
common/http.h
vendor/cpp-httplib/CMakeLists.txt

index 8e29787dcc6f7591688221a24b3453db1d69f5a2..7c683aafcf29a01723294c7dc7e9f169b87a18e0 100644 (file)
@@ -57,6 +57,17 @@ static std::pair<httplib::Client, common_http_url> common_http_client(const std:
         throw std::runtime_error("error: invalid URL format");
     }
 
+#ifndef CPPHTTPLIB_OPENSSL_SUPPORT
+    if (parts.scheme == "https") {
+        throw std::runtime_error(
+            "HTTPS is not supported. Please rebuild with:\n"
+            "  -DLLAMA_BUILD_BORINGSSL=ON\n"
+            "  -DLLAMA_BUILD_LIBRESSL=ON\n"
+            "or ensure dev files of an OpenSSL-compatible library are available when building."
+        );
+    }
+#endif
+
     httplib::Client cli(parts.scheme + "://" + parts.host);
 
     if (!parts.user.empty()) {
index 172b925453f35b630d46da9d29b52ab4d3f6eb06..3d938d9f365b1bf0c09448d4d8ad2f3a044365d3 100644 (file)
@@ -142,7 +142,7 @@ elseif (LLAMA_OPENSSL)
             target_link_libraries(${TARGET} PUBLIC OpenSSL::SSL OpenSSL::Crypto)
         endif()
     else()
-        message(STATUS "OpenSSL not found, SSL support disabled")
+        message(WARNING "OpenSSL not found, HTTPS support disabled")
     endif()
 endif()