[epiphany] uri-tester: Fix criticals before libhttpseverywhere is initialized



commit dc2e8c4fdee3767f9b23569837c23b1583294ae2
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Nov 21 13:13:13 2016 -0600

    uri-tester: Fix criticals before libhttpseverywhere is initialized
    
    I added a performance optimization to short-circuit the deferred request
    system for non-http:// URIs, since there's no reason to wait for
    libhttpseverywhere to be ready before processing them. But I forgot to
    actually not use libhttpseverywhere in that case, and changed
    libhttpseverywhere to emit the critical immediately instead of after
    checking the URI scheme.

 embed/ephy-uri-tester.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-uri-tester.c b/embed/ephy-uri-tester.c
index f5ecdfb..07b1a0b 100644
--- a/embed/ephy-uri-tester.c
+++ b/embed/ephy-uri-tester.c
@@ -870,9 +870,13 @@ ephy_uri_tester_rewrite_uri (EphyUriTester *tester,
   if (!modified_uri)
     modified_uri = g_strdup (request_uri);
 
-  result = https_everywhere_context_rewrite (tester->https_everywhere_context,
-                                             modified_uri);
-  g_free (modified_uri);
+  if (g_str_has_prefix (request_uri, SOUP_URI_SCHEME_HTTP)) {
+    result = https_everywhere_context_rewrite (tester->https_everywhere_context,
+                                               modified_uri);
+    g_free (modified_uri);
+  } else {
+    result = modified_uri;
+  }
 
   return result;
 }


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