Fix OctoWoW cloning behind BlazingFastWeb
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QtLogging>
|
#include <QtLogging>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
#include <git2.h>
|
||||||
|
#include <git2/version.h>
|
||||||
|
|
||||||
QtMessageHandler originalHandler = nullptr;
|
QtMessageHandler originalHandler = nullptr;
|
||||||
|
|
||||||
@@ -90,6 +92,18 @@ int main(int argc, char *argv[])
|
|||||||
engine.load(QUrl(QStringLiteral("qrc:/Update.qml")));
|
engine.load(QUrl(QStringLiteral("qrc:/Update.qml")));
|
||||||
} else {
|
} else {
|
||||||
Control::instance()->init();
|
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<Addon>("GitAddonsManager.engine",1,0,"Addon","");
|
qmlRegisterUncreatableType<Addon>("GitAddonsManager.engine",1,0,"Addon","");
|
||||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||||
if (parser.isSet("oneshot")) {
|
if (parser.isSet("oneshot")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user