Introduction
Introduction Statistics Contact Development Disclaimer Help
Test URI type with webkit instead of manually - from quinq - surf-adblock - Sur…
git clone git://git.codemadness.org/surf-adblock
Log
Files
Refs
README
LICENSE
---
commit 45bbe933e712772b3f1513c8a8970b7e2743f07c
parent d781090ae7718310fb13c83c1a8406be46a613b8
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 3 Jun 2017 22:09:25 +0200
Test URI type with webkit instead of manually - from quinq
The work has already been done so we should as well use it.
Diffstat:
M surf-adblock.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/surf-adblock.c b/surf-adblock.c
@@ -790,8 +790,7 @@ documentloaded(WebKitWebPage *wp, Page *p)
const char *s, *uri = webkit_web_page_get_uri(p->webpage);
size_t len;
- if (!uri || (strncmp(uri, "http://", sizeof("http://") - 1) &&
- strncmp(uri, "https://", sizeof("https://") - 1)))
+ if (!uri)
return;
s = strstr(uri, "://") + sizeof("://") - 1;
@@ -882,8 +881,7 @@ sendrequest(WebKitWebPage *wp, WebKitURIRequest *req,
gboolean status = FALSE;
if (!uri || !strcmp(requri, uri) ||
- (strncmp(uri, "http://", sizeof("http://") - 1) &&
- strncmp(uri, "https://", sizeof("https://") - 1)))
+ !webkit_uri_request_get_http_method(req))
return FALSE;
s = strstr(uri, "://") + sizeof("://") - 1;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.