[libsoup/wip/tpopela/negotiate] When testing if a scheme of an URI is HTTPS avoid a string comparison
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/tpopela/negotiate] When testing if a scheme of an URI is HTTPS avoid a string comparison
- Date: Sat, 6 Feb 2016 15:46:46 +0000 (UTC)
commit 7114117e20d428d522d932ec4d8fa9285618e2d4
Author: Tomas Popela <tpopela redhat com>
Date: Sat Feb 6 15:42:52 2016 +0100
When testing if a scheme of an URI is HTTPS avoid a string comparison
libsoup/soup-auth-negotiate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c
index 5130bec..100a46b 100644
--- a/libsoup/soup-auth-negotiate.c
+++ b/libsoup/soup-auth-negotiate.c
@@ -382,7 +382,7 @@ check_auth_trusted_uri (SoupAuthNegotiate *negotiate, SoupMessage *msg)
/* If no trusted uris are set, we allow all https uris */
if (!trusted_uris)
- return g_ascii_strncasecmp (msg_uri->scheme, "https", 5) == 0;
+ return msg_uri->scheme == SOUP_URI_SCHEME_HTTPS;
matched = g_slist_find_custom (trusted_uris,
msg_uri,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]