From e77263d40d0be448bf3b50fc0fa4bfed8099bea0 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Sat, 12 Sep 2026 15:27:25 +0200 Subject: [PATCH] Fix OctoWoW cloning behind BlazingFastWeb --- main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main.cpp b/main.cpp index 79475e1..787df9f 100644 --- a/main.cpp +++ b/main.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include QtMessageHandler originalHandler = nullptr; @@ -90,6 +92,18 @@ int main(int argc, char *argv[]) engine.load(QUrl(QStringLiteral("qrc:/Update.qml"))); } else { Control::instance()->init(); + +#ifdef LIBGIT2_VERSION_CHECK +#if LIBGIT2_VERSION_CHECK(1, 8, 1) + // OctoWoW is protected by BlazingFastWeb, which serves an HTML + // challenge to clients using the default git/* User-Agent. + // Use the curl User-Agent that the server accepts while keeping + // libgit2's normal Git Smart HTTP implementation unchanged. + git_libgit2_opts(GIT_OPT_SET_USER_AGENT_PRODUCT, "curl/8.21.0"); + git_libgit2_opts(GIT_OPT_SET_USER_AGENT, ""); +#endif +#endif + qmlRegisterUncreatableType("GitAddonsManager.engine",1,0,"Addon",""); engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (parser.isSet("oneshot")) {