]> spindle.queued.net Git - midori/commitdiff
Ignore request if the source is a redirect and of the main frame
authorAndré Stösel <andre@stoesel.de>
Fri, 13 Apr 2012 01:02:22 +0000 (03:02 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 13 Apr 2012 21:40:27 +0000 (23:40 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/979767
extensions/adblock.c

index 061378729a98d5f66200f0e5cdf877a395e15c39..2b35fa53837d2a0a4e23c2114be350de04ee3b21 100644 (file)
@@ -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 ();