From: André Stösel Date: Fri, 13 Apr 2012 01:02:22 +0000 (+0200) Subject: Ignore request if the source is a redirect and of the main frame X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f795a62cbd33eb0dcdf8b9d596d89a4b0aa72dd;p=midori Ignore request if the source is a redirect and of the main frame Fixes: https://bugs.launchpad.net/midori/+bug/979767 --- 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 ();