Title: [157406] trunk/Source/WebKit2
Revision
157406
Author
[email protected]
Date
2013-10-14 10:16:23 -0700 (Mon, 14 Oct 2013)

Log Message

[WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings.
https://bugs.webkit.org/show_bug.cgi?id=118388

Reviewed by Carlos Garcia Campos.

Original patch by Kwang Yul Seo <[email protected]> .

Proxy configuration should honor the no_proxy environment variable
same to WebProcess. It is necessary not to change the current behaviour.
See https://bugs.webkit.org/show_bug.cgi?id=91747 for details.

The following things were fixed by Csaba Osztrogonác:
- moved session variable before #if not to have conflict with https://bugs.webkit.org/show_bug.cgi?id=118343
- added GRefPtr.h include
- fixed ifdef guards

* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
(WebKit::NetworkProcessMain):
Copied from WebProcessMainEfl.cpp.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (157405 => 157406)


--- trunk/Source/WebKit2/ChangeLog	2013-10-14 16:52:23 UTC (rev 157405)
+++ trunk/Source/WebKit2/ChangeLog	2013-10-14 17:16:23 UTC (rev 157406)
@@ -1,3 +1,25 @@
+2013-10-14  Csaba Osztrogonác  <[email protected]>
+
+        [WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings.
+        https://bugs.webkit.org/show_bug.cgi?id=118388
+
+        Reviewed by Carlos Garcia Campos.
+
+        Original patch by Kwang Yul Seo <[email protected]> .
+
+        Proxy configuration should honor the no_proxy environment variable
+        same to WebProcess. It is necessary not to change the current behaviour.
+        See https://bugs.webkit.org/show_bug.cgi?id=91747 for details.
+
+        The following things were fixed by Csaba Osztrogonác:
+        - moved session variable before #if not to have conflict with https://bugs.webkit.org/show_bug.cgi?id=118343
+        - added GRefPtr.h include
+        - fixed ifdef guards
+
+        * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
+        (WebKit::NetworkProcessMain):
+        Copied from WebProcessMainEfl.cpp.
+
 2013-10-13  Darin Adler  <[email protected]>
 
         Deprecate or remove deleteAllValues functions; there are only a few call sites left

Modified: trunk/Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp (157405 => 157406)


--- trunk/Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp	2013-10-14 16:52:23 UTC (rev 157405)
+++ trunk/Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp	2013-10-14 17:16:23 UTC (rev 157406)
@@ -29,6 +29,7 @@
 
 #if ENABLE(NETWORK_PROCESS)
 
+#include "ProxyResolverSoup.h"
 #include "WKBase.h"
 #include "WebKit2Initialize.h"
 #include <WebCore/RunLoop.h>
@@ -37,6 +38,7 @@
 #include <runtime/InitializeThreading.h>
 #include <stdlib.h>
 #include <wtf/MainThread.h>
+#include <wtf/gobject/GRefPtr.h>
 
 #if PLATFORM(EFL)
 #include <Ecore.h>
@@ -61,7 +63,18 @@
 
     InitializeWebKit2();
 
-    // FIXME: handle proxy settings.
+#if USE(SOUP)
+    SoupSession* session = WebCore::ResourceHandle::defaultSession();
+#if PLATFORM(EFL)
+    // Only for EFL because GTK port uses the default resolver, which uses GIO's proxy resolver.
+    const char* httpProxy = getenv("http_proxy");
+    if (httpProxy) {
+        const char* noProxy = getenv("no_proxy");
+        GRefPtr<SoupProxyURIResolver> resolver = adoptGRef(soupProxyResolverWkNew(httpProxy, noProxy));
+        soup_session_add_feature(session, SOUP_SESSION_FEATURE(resolver.get()));
+    }
+#endif
+#endif
 
     int socket = atoi(argv[1]);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to