2
0
mirror of https://github.com/qbittorrent/qBittorrent.git synced 2025-02-23 19:29:40 +08:00

Merge pull request from Chocobo1/url

WebUI: Only prepend scheme when it is not present. Closes .
This commit is contained in:
Mike Tzou 2017-12-19 22:43:03 +08:00 committed by GitHub
commit b8277614ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}