Ignore request if the source is a redirect and of the main frame

Fixes: https://bugs.launchpad.net/midori/+bug/979767
This commit is contained in:
André Stösel 2012-04-13 03:02:22 +02:00 committed by Christian Dywan
parent da5f257314
commit 3f795a62cb

View file

@ -833,6 +833,15 @@ adblock_resource_request_starting_cb (WebKitWebView* web_view,
if (!(msg && !g_strcmp0 (msg->method, "GET"))) if (!(msg && !g_strcmp0 (msg->method, "GET")))
return; 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 #ifdef G_ENABLE_DEBUG
if (debug == 2) if (debug == 2)
g_test_timer_start (); g_test_timer_start ();