aboutsummaryrefslogtreecommitdiff
path: root/src/capi.c
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-09-16 02:01:45 +0000
committercorvid <corvid@lavabit.com>2011-09-16 02:01:45 +0000
commita681f3f2bb769a752093517d920d57f9df8748c7 (patch)
tree415ff2e01592909d1b2f049bf659274254467c19 /src/capi.c
parent7c6c617b0d71d06294842686ea4b3ef7abe7414f (diff)
put public suffix comparison directly in url.c
Diffstat (limited to 'src/capi.c')
-rw-r--r--src/capi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/capi.c b/src/capi.c
index a0ede65d..421a3841 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -385,9 +385,7 @@ static bool_t Capi_filters_test(const DilloUrl *wanted,
case PREFS_FILTER_SAME_DOMAIN:
{
const char *req_host = URL_HOST(requester),
- *want_host = URL_HOST(wanted),
- *req_suffix,
- *want_suffix;
+ *want_host = URL_HOST(wanted);
if (want_host[0] == '\0') {
ret = (req_host[0] == '\0' ||
!dStrcasecmp(URL_SCHEME(wanted), "data")) ? TRUE : FALSE;
@@ -395,10 +393,7 @@ static bool_t Capi_filters_test(const DilloUrl *wanted,
/* This will regard "www.dillo.org" and "www.dillo.org." as
* different, but it doesn't seem worth caring about.
*/
- req_suffix = a_Url_host_find_public_suffix(req_host);
- want_suffix = a_Url_host_find_public_suffix(want_host);
-
- ret = dStrcasecmp(req_suffix, want_suffix) == 0;
+ ret = a_Url_same_public_suffix(wanted, requester);
}
MSG("Capi_filters_test: %s from '%s' to '%s'\n",