[epiphany] uri-tester: Only defer page loads if really required



commit 314af73eb85cfee4151d923a0e8c54b659ee965e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Oct 24 19:39:44 2016 -0500

    uri-tester: Only defer page loads if really required
    
    If the URI doesn't begin with http:// then there's no point in delaying
    the load while HTTPS Everywhere rulesets are loaded.

 embed/ephy-uri-tester.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-uri-tester.c b/embed/ephy-uri-tester.c
index 4df4d76..33ea6aa 100644
--- a/embed/ephy-uri-tester.c
+++ b/embed/ephy-uri-tester.c
@@ -925,7 +925,8 @@ handle_method_call (GDBusConnection       *connection,
       return;
     }
 
-    if (https_everywhere_context_get_initialized (tester->https_everywhere_context)) {
+    if (!g_str_has_prefix (request_uri, SOUP_URI_SCHEME_HTTP) ||
+        https_everywhere_context_get_initialized (tester->https_everywhere_context)) {
       ephy_uri_tester_return_response (tester, request_uri, page_uri, invocation);
     } else {
       DeferredRequest *request = deferred_request_new (request_uri, page_uri, invocation);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]