From: Christian Dywan Date: Sat, 29 Oct 2011 01:32:16 +0000 (+0200) Subject: Use Midori.URI API in adblock_resource_request_starting_cb X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff569e8328329faf75935c4545534a9c148e7443;p=midori Use Midori.URI API in adblock_resource_request_starting_cb --- diff --git a/extensions/adblock.c b/extensions/adblock.c index c76ddba7..35f87821 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -766,21 +766,12 @@ adblock_resource_request_starting_cb (WebKitWebView* web_view, return; req_uri = webkit_network_request_get_uri (request); - - if (!req_uri) - return; - if (!strncmp (req_uri, "data", 4) || !strncmp (req_uri, "file", 4)) - return; - if (!strncmp (req_uri, "stock", 5) || !strncmp (req_uri, "res", 3)) - return; - - if (g_str_has_suffix (req_uri, "favicon.ico")) + if (!midori_uri_is_http (req_uri) + || g_str_has_suffix (req_uri, "favicon.ico")) return; msg = webkit_network_request_get_message (request); - if (!msg) - return; - if (msg->method && !strncmp (msg->method, "POST", 4)) + if (!(msg && !g_strcmp0 (msg->method, "GET"))) return; #ifdef G_ENABLE_DEBUG