[epiphany/gnome-3-20] web-extension: adblocker should never block the main resource
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-20] web-extension: adblocker should never block the main resource
- Date: Tue, 25 Oct 2016 13:43:26 +0000 (UTC)
commit b461ad26bffe42cd04d5c755c64dd767bcfaec9d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Oct 25 08:35:02 2016 -0500
web-extension: adblocker should never block the main resource
We had a check for this, but it got broken in do not track mode.
embed/web-extension/ephy-web-extension.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 514d22e..2a9a37a 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -112,11 +112,13 @@ web_page_send_request (WebKitWebPage *web_page,
WebKitURIResponse *redirected_response,
EphyWebExtension *extension)
{
+ const char *original_request_uri;
const char *request_uri;
const char *page_uri;
gboolean ret;
request_uri = webkit_uri_request_get_uri (request);
+ original_request_uri = request_uri;
if (g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_DO_NOT_TRACK)) {
SoupMessageHeaders *headers;
@@ -144,7 +146,7 @@ web_page_send_request (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 (original_request_uri, page_uri) == 0)
return FALSE;
/* Always load data requests, as uri_tester won't do any good here. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]