[epiphany/gnome-3-10] web-extension: do not pass data uris through the uri tester
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-10] web-extension: do not pass data uris through the uri tester
- Date: Sun, 8 Dec 2013 19:19:19 +0000 (UTC)
commit c5f6f056bd020ae7e55742255bcf91f3ce3f6ce0
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sun Dec 8 20:08:49 2013 +0100
web-extension: do not pass data uris through the uri tester
As this is always going to fail. Also it can be pretty slow
for large data.
embed/web-extension/ephy-web-extension.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 8a31e00..a87139a 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -102,6 +102,10 @@ web_page_send_request (WebKitWebPage *web_page,
if (g_strcmp0 (request_uri, page_uri) == 0)
return FALSE;
+ /* Always load data requests, as uri_tester won't do any good here. */
+ if (g_str_has_prefix (request_uri, SOUP_URI_SCHEME_DATA))
+ return FALSE;
+
return uri_tester_test_uri (uri_tester, request_uri, page_uri, AD_URI_CHECK_TYPE_OTHER);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]