diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-24 21:47:15 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-01-24 22:00:25 +0000 |
commit | dab6d7961ea6fb70aa6021e5dc7a189915b0c10c (patch) | |
tree | f468dd8968faab4db74bcc8170aa2619f21f87ce /desktop/browser.c | |
parent | d64754aca433697a16ba9b1e56f2dc5de3fc0bd4 (diff) | |
download | netsurf-dab6d7961ea6fb70aa6021e5dc7a189915b0c10c.tar.gz netsurf-dab6d7961ea6fb70aa6021e5dc7a189915b0c10c.tar.bz2 |
Actually use the fact scheme is interned.
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index f66e27576..d94a2872a 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -60,6 +60,7 @@ #include "render/form.h" #include "render/html.h" #include "render/box.h" +#include "utils/corestrings.h" #include "utils/log.h" #include "utils/messages.h" #include "utils/nsurl.h" @@ -1004,6 +1005,7 @@ static void browser_window_update_favicon(hlcache_handle *c, if (link == NULL) { lwc_string *scheme; bool speculative_default = false; + bool match; nsurl = hlcache_handle_get_url(c); @@ -1011,12 +1013,10 @@ static void browser_window_update_favicon(hlcache_handle *c, /* If the document was fetched over http(s), then speculate * that there's a favicon living at /favicon.ico */ - if ((lwc_string_length(scheme) == SLEN("HTTP") && - strcasecmp(lwc_string_data(scheme), - "http") == 0) || - (lwc_string_length(scheme) == SLEN("HTTPS") && - strcasecmp(lwc_string_data(scheme), - "https") == 0)) { + if ((lwc_string_caseless_isequal(scheme, corestring_lwc_http, + &match) == lwc_error_ok && match) || + (lwc_string_caseless_isequal(scheme, corestring_lwc_https, + &match) == lwc_error_ok && match)) { speculative_default = true; } |