void
usage(void)
{
- die("usage: %s [-bBdDfFgGiIkKmMnNpPsStTvx] [-a cookiepolicies ] "
+ die("usage: %s [-bBdDfFgGiIkKmMnNpPsStTvwxX] [-a cookiepolicies ] "
"[-c cookiefile] [-C stylefile] [-e xid] [-r scriptfile] "
"[-u useragent] [-z zoomlevel] [uri]\n", basename(argv0));
}
return;
}
- uri = strstr(uri, "://") + sizeof("://") - 1;
- host = strndup(uri, strstr(uri, "/") - uri);
+ if ((uri = strstr(uri, "https://"))) {
+ uri += sizeof("https://") - 1;
+ host = g_strndup(uri, strchr(uri, '/') - uri);
+ webkit_web_context_allow_tls_certificate_for_host(
+ webkit_web_view_get_context(c->view), cert, host);
+ g_free(host);
+ }
- webkit_web_context_allow_tls_certificate_for_host(
- webkit_web_view_get_context(c->view), cert, host);
g_object_unref(cert);
- free(host);
}
const char *
"enable-site-specific-quirks", curconfig[SiteQuirks].val.b,
"media-playback-requires-user-gesture", curconfig[MediaManualPlay].val.b,
NULL);
-/* For mor interesting settings, have a look at
+/* For more interesting settings, have a look at
* http://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html */
if (strcmp(fulluseragent, "")) {