From: Flavio Tordini Date: Fri, 30 Oct 2009 23:16:18 +0000 (+0100) Subject: Remove trailing slash in HTTP_PROXY, if any X-Git-Tag: 0.8~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d65259645176e9a7f5c14c9f284e0f2e832ccb52;p=minitube Remove trailing slash in HTTP_PROXY, if any Fix by Eduardo Suarez-Santana --- diff --git a/src/global.h b/src/global.h index 4f64187..502e329 100644 --- a/src/global.h +++ b/src/global.h @@ -67,6 +67,10 @@ namespace The { QString http_proxy = QString(http_proxy_env); http_proxy.remove(QRegExp("^http://")); + // Remove trailing slash, if any + // Fix by Eduardo Suarez-Santana + http_proxy.remove(QRegExp("/$")); + // parse username and password if (http_proxy.contains(QChar('@'))) { QStringList http_proxy_list = http_proxy.split(QChar('@')); @@ -141,18 +145,13 @@ namespace The { static NetworkAccess *g_http = 0; NetworkAccess* http() { - if (!g_http) + if (!g_http) { + // qDebug() << "Creating NetworkAccess"; g_http = new NetworkAccess(); + } return g_http; } } #endif // GLOBAL_H - -/* - * Local Variables: - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */