From d65259645176e9a7f5c14c9f284e0f2e832ccb52 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Sat, 31 Oct 2009 00:16:18 +0100 Subject: [PATCH] Remove trailing slash in HTTP_PROXY, if any Fix by Eduardo Suarez-Santana --- src/global.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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: - */ -- 2.39.5