[evolution/wip/webkit2] [WebExtension] Do not try to redirect http:/https: pages
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] [WebExtension] Do not try to redirect http:/https: pages
- Date: Mon, 7 Mar 2016 16:51:07 +0000 (UTC)
commit a50272b5a24ea018a717582b2a42d827bdffe977
Author: Milan Crha <mcrha redhat com>
Date: Mon Mar 7 17:50:33 2016 +0100
[WebExtension] Do not try to redirect http:/https: pages
If the web page is for a pure http:/https: URI, then it should not try to
redirect the http:/https: requests, because those are not mails, but real
pages.
web-extensions/e-web-extension.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/web-extensions/e-web-extension.c b/web-extensions/e-web-extension.c
index 7e1e32e..2c7354d 100644
--- a/web-extensions/e-web-extension.c
+++ b/web-extensions/e-web-extension.c
@@ -650,7 +650,10 @@ web_page_send_request_cb (WebKitWebPage *web_page,
page_uri = webkit_web_page_get_uri (web_page);
/* Always load the main resource. */
- if (g_strcmp0 (request_uri, page_uri) == 0)
+ if (g_strcmp0 (request_uri, page_uri) == 0 ||
+ /* Do not influence real pages, like those with eds OAuth sign-in */
+ g_str_has_prefix (page_uri, "http:") ||
+ g_str_has_prefix (page_uri, "https:"))
return FALSE;
uri_is_http =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]