summaryrefslogtreecommitdiffstats
path: root/surf.c
diff options
context:
space:
mode:
authorGravatar Quentin Rameau 2015-11-22 15:19:10 +0100
committerGravatar Quentin Rameau 2015-11-22 15:19:10 +0100
commitc3a827d621fbedfb974db9d137d3e5bea66490b4 (patch)
treef3268fb4a12be48c11340ba40abdc334eb9ae324 /surf.c
parentStyle change in newview(), sort signals order (diff)
Modify decideresource() and favicon handling
Return as soon as the request has been processed. No need to modify the favicon uri, just ignore it.
Diffstat (limited to '')
-rw-r--r--surf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/surf.c b/surf.c
index 1f3b7db..f5c7d1e 100644
--- a/surf.c
+++ b/surf.c
@@ -1143,10 +1143,10 @@ decideresource(WebKitPolicyDecision *d, Client *c)
webkit_response_policy_decision_get_response(r);
const gchar *uri = webkit_uri_response_get_uri(res);
- if (g_str_has_suffix(uri, "/favicon.ico"))
- webkit_uri_request_set_uri(
- webkit_response_policy_decision_get_request(r),
- "about:blank");
+ if (g_str_has_suffix(uri, "/favicon.ico")) {
+ webkit_policy_decision_ignore(d);
+ return;
+ }
if (!g_str_has_prefix(uri, "http://")
&& !g_str_has_prefix(uri, "https://")
@@ -1164,6 +1164,7 @@ decideresource(WebKitPolicyDecision *d, Client *c)
if (isascii) {
handleplumb(c, uri);
webkit_policy_decision_ignore(d);
+ return;
}
}