[epiphany] uri-tester: Do not rewrite HTTPS urls



commit 5f91b4d2f04ff573c5d1599d793b0991cb50dfbc
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Sat Nov 26 14:53:19 2016 +0100

    uri-tester: Do not rewrite HTTPS urls
    
    We are checking if the url starts with SOUP_URI_SCHEME_HTTP, which is
    "http" and HTTPS urls also start with http so we are rewriting every
    single HTTP and HTTPS request. Check if url starts with "http://";
    instead.

 embed/ephy-uri-tester.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-uri-tester.c b/embed/ephy-uri-tester.c
index 7cd562a..a592fda 100644
--- a/embed/ephy-uri-tester.c
+++ b/embed/ephy-uri-tester.c
@@ -772,7 +772,7 @@ ephy_uri_tester_rewrite_uri (EphyUriTester    *tester,
     modified_uri = g_strdup (request_uri);
 
   if ((flags & EPHY_URI_TEST_HTTPS_EVERYWHERE) &&
-      g_str_has_prefix (request_uri, SOUP_URI_SCHEME_HTTP)) {
+      g_str_has_prefix (request_uri, "http://";)) {
     result = https_everywhere_context_rewrite (tester->https_everywhere_context,
                                                modified_uri);
     g_free (modified_uri);
@@ -869,7 +869,7 @@ handle_method_call (GDBusConnection       *connection,
     }
 
     if ((flags & EPHY_URI_TEST_HTTPS_EVERYWHERE) == 0 ||
-        !g_str_has_prefix (request_uri, SOUP_URI_SCHEME_HTTP) ||
+        !g_str_has_prefix (request_uri, "http://";) ||
         https_everywhere_context_get_initialized (tester->https_everywhere_context)) {
       ephy_uri_tester_return_response (tester, request_uri, page_uri, flags, invocation);
     } else {


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