X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Finit.c;h=033da4f7634159396cc18a4632b32ead857c9a80;hp=54a291987755fa04228ab062df376d1db63fef6e;hb=42c78fdd71c311cf96210b709ec0a18ef45ef87f;hpb=099d8ee3da3a6eea5635581ae517035165f400a5 diff --git a/src/init.c b/src/init.c index 54a29198..033da4f7 100644 --- a/src/init.c +++ b/src/init.c @@ -194,6 +194,9 @@ static const struct { { "httppasswd", &opt.http_passwd, cmd_string }, /* deprecated */ { "httppassword", &opt.http_passwd, cmd_string }, { "httpproxy", &opt.http_proxy, cmd_string }, +#ifdef HAVE_SSL + { "httpsonly", &opt.https_only, cmd_boolean }, +#endif { "httpsproxy", &opt.https_proxy, cmd_string }, { "httpuser", &opt.http_user, cmd_string }, { "ignorecase", &opt.ignore_case, cmd_boolean }, @@ -965,15 +968,16 @@ cmd_string (const char *com, const char *val, void *place) static bool cmd_string_uppercase (const char *com, const char *val, void *place) { - char *q; - bool ret = cmd_string (com, val, place); - q = *((char **) place); - if (!ret || q == NULL) - return false; + char *q, **pstring; + pstring = (char **)place; + xfree_null (*pstring); + + *pstring = xmalloc (strlen (val) + 1); - for ( ;*q; *q++) - *q = c_toupper (*q); + for (q = *pstring; *val; val++, q++) + *q = c_toupper (*val); + *q = '\0'; return true; }