From fb6bdbefd5a1643eec602f3c42ffd7ea864b7a04 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 18 Dec 2017 14:12:31 +0800 Subject: [PATCH] WebUI: Only prepend scheme when it is not present. Closes #8057. --- src/webui/abstractwebapplication.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webui/abstractwebapplication.cpp b/src/webui/abstractwebapplication.cpp index ccfb61a94..d855bab0f 100644 --- a/src/webui/abstractwebapplication.cpp +++ b/src/webui/abstractwebapplication.cpp @@ -90,7 +90,9 @@ namespace { inline QUrl urlFromHostHeader(const QString &hostHeader) { - return QUrl(QLatin1String("http://") + hostHeader); + if (!hostHeader.contains(QLatin1String("://"))) + return QUrl(QLatin1String("http://") + hostHeader); + return hostHeader; } }