]> git.sur5r.net Git - minitube/commitdiff
Remove trailing slash in HTTP_PROXY, if any
authorFlavio Tordini <flavio.tordini@gmail.com>
Fri, 30 Oct 2009 23:16:18 +0000 (00:16 +0100)
committerFlavio Tordini <flavio.tordini@gmail.com>
Fri, 30 Oct 2009 23:16:18 +0000 (00:16 +0100)
Fix by Eduardo Suarez-Santana

src/global.h

index 4f64187dcabf6a5b71cc407a1dda2eee9a084fe4..502e329f9f3a9f24aa6eca2bed975490ad556a82 100644 (file)
@@ -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:
- */