From 3f795a62cbd33eb0dcdf8b9d596d89a4b0aa72dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20St=C3=B6sel?= Date: Fri, 13 Apr 2012 03:02:22 +0200 Subject: [PATCH] Ignore request if the source is a redirect and of the main frame Fixes: https://bugs.launchpad.net/midori/+bug/979767 --- extensions/adblock.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extensions/adblock.c b/extensions/adblock.c index 06137872..2b35fa53 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -833,6 +833,15 @@ adblock_resource_request_starting_cb (WebKitWebView* web_view, if (!(msg && !g_strcmp0 (msg->method, "GET"))) return; + if (response != NULL) /* request is caused by redirect */ + { + if (web_frame == webkit_web_view_get_main_frame (web_view)) + { + g_hash_table_replace (navigationwhitelist, web_view, g_strdup (req_uri)); + return; + } + } + #ifdef G_ENABLE_DEBUG if (debug == 2) g_test_timer_start ();