[Xfce4-commits] <midori:master> Use Midori.URI API in adblock_resource_request_starting_cb
Christian Dywan
noreply at xfce.org
Sat Oct 29 03:38:01 CEST 2011
Updating branch refs/heads/master
to ff569e8328329faf75935c4545534a9c148e7443 (commit)
from a25c34e280977a22b036ea1258b864abcfb339cc (commit)
commit ff569e8328329faf75935c4545534a9c148e7443
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Oct 29 03:32:16 2011 +0200
Use Midori.URI API in adblock_resource_request_starting_cb
extensions/adblock.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/extensions/adblock.c b/extensions/adblock.c
index c76ddba..35f8782 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
More information about the Xfce4-commits
mailing list