Title: [97154] trunk/Source/WebKit2
Revision
97154
Author
[email protected]
Date
2011-10-11 09:13:11 -0700 (Tue, 11 Oct 2011)

Log Message

[Qt] WebProcess using proxy settings for localhost as well
https://bugs.webkit.org/show_bug.cgi?id=69611

Patch by Gopal Raghavan <[email protected]> on 2011-10-11
Reviewed by Chang Shu.

Implemented checks in queryProxy to return QNetworkProxy::NoProxy for localhost and 127.0.0.1

* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::EnvHttpProxyFactory::queryProxy):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (97153 => 97154)


--- trunk/Source/WebKit2/ChangeLog	2011-10-11 16:02:52 UTC (rev 97153)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-11 16:13:11 UTC (rev 97154)
@@ -1,3 +1,15 @@
+2011-10-11  Gopal Raghavan  <[email protected]>
+
+        [Qt] WebProcess using proxy settings for localhost as well
+        https://bugs.webkit.org/show_bug.cgi?id=69611
+
+        Reviewed by Chang Shu.
+
+        Implemented checks in queryProxy to return QNetworkProxy::NoProxy for localhost and 127.0.0.1
+
+        * WebProcess/qt/WebProcessMainQt.cpp:
+        (WebKit::EnvHttpProxyFactory::queryProxy):
+
 2011-10-11  Tor Arne Vestbø  <[email protected]>
 
         [Qt] Remove all references to QTDIR_build and standalone_package

Modified: trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp (97153 => 97154)


--- trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp	2011-10-11 16:02:52 UTC (rev 97153)
+++ trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp	2011-10-11 16:13:11 UTC (rev 97154)
@@ -104,9 +104,13 @@
 QList<QNetworkProxy> EnvHttpProxyFactory::queryProxy(const QNetworkProxyQuery& query)
 {
     QString protocol = query.protocolTag().toLower();
-    if (protocol == QLatin1String("http"))
+    bool localHost = false;
+
+    if (!query.peerHostName().compare(QLatin1String("localhost"), Qt::CaseInsensitive) || !query.peerHostName().compare(QLatin1String("127.0.0.1"), Qt::CaseInsensitive))
+        localHost = true;
+    if (protocol == QLatin1String("http") && !localHost)
         return m_httpProxy;
-    else if (protocol == QLatin1String("https"))
+    if (protocol == QLatin1String("https") && !localHost)
         return m_httpsProxy;
 
     QList<QNetworkProxy> proxies;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to