Use Midori.URI API in adblock_resource_request_starting_cb

This commit is contained in:
Christian Dywan 2011-10-29 03:32:16 +02:00
parent a25c34e280
commit ff569e8328

View file

@ -766,21 +766,12 @@ adblock_resource_request_starting_cb (WebKitWebView* web_view,
return; return;
req_uri = webkit_network_request_get_uri (request); req_uri = webkit_network_request_get_uri (request);
if (!midori_uri_is_http (req_uri)
if (!req_uri) || g_str_has_suffix (req_uri, "favicon.ico"))
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"))
return; return;
msg = webkit_network_request_get_message (request); msg = webkit_network_request_get_message (request);
if (!msg) if (!(msg && !g_strcmp0 (msg->method, "GET")))
return;
if (msg->method && !strncmp (msg->method, "POST", 4))
return; return;
#ifdef G_ENABLE_DEBUG #ifdef G_ENABLE_DEBUG