X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgisimple.c;h=3be01e397cef6fd510af6341213da12099181d6b;hp=2a1ab8fb11b6147d595f29494586f8a4245a3c85;hb=3666edee4a979ed6921545e95e467008e9eddd91;hpb=5ca53f92bc634c20fed90f338ac41561f87b834c diff --git a/cgisimple.c b/cgisimple.c index 2a1ab8fb..3be01e39 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -6,7 +6,7 @@ * status. * * Copyright : Written by and Copyright (C) 2001-2017 the - * Privoxy team. http://www.privoxy.org/ + * Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -308,7 +308,7 @@ static void cgi_create_client_tag_form(char *form, size_t size, snprintf(form, size, "
\n" " \n" - " \n" + " \n" " \n" " \n" "
", tag, toggle_state, !expires, button_name); @@ -401,7 +401,7 @@ jb_err cgi_show_client_tags(struct client_state *csp, refresh_delay = get_next_tag_timeout_for_client(csp->client_address); if (refresh_delay != 0) { - snprintf(buf, sizeof(buf), "%d", csp->config->client_tag_lifetime); + snprintf(buf, sizeof(buf), "%u", csp->config->client_tag_lifetime); if (map(exports, "refresh-delay", 1, buf, 1)) { free_map(exports); @@ -1031,43 +1031,6 @@ jb_err cgi_send_user_manual(struct client_state *csp, } -/********************************************************************* - * - * Function : cgi_show_version - * - * Description : CGI function that returns a a web page describing the - * file versions of Privoxy. - * - * Parameters : - * 1 : csp = Current client state (buffers, headers, etc...) - * 2 : rsp = http_response data structure for output - * 3 : parameters = map of cgi parameters - * - * CGI Parameters : none - * - * Returns : JB_ERR_OK on success - * JB_ERR_MEMORY on out-of-memory error. - * - *********************************************************************/ -jb_err cgi_show_version(struct client_state *csp, - struct http_response *rsp, - const struct map *parameters) -{ - struct map *exports; - - assert(csp); - assert(rsp); - assert(parameters); - - if (NULL == (exports = default_exports(csp, "show-version"))) - { - return JB_ERR_MEMORY; - } - - return template_fill_for_cgi(csp, "show-version", exports, rsp); -} - - /********************************************************************* * * Function : cgi_show_status @@ -1402,7 +1365,7 @@ jb_err cgi_show_url_info(struct client_state *csp, if (url_param[0] == '\0') { - /* URL paramater not specified, display query form only. */ + /* URL parameter not specified, display query form only. */ free(url_param); if (map_block_killer(exports, "url-given") || map(exports, "url", 1, "", 1)) @@ -1475,11 +1438,14 @@ jb_err cgi_show_url_info(struct client_state *csp, } /* - * We have a warning about SSL paths. Hide it for unencrypted sites. + * We have a warning about SSL paths. Hide it for unencrypted sites + * and unconditionally if https inspection is enabled. */ +#ifndef FEATURE_HTTPS_INSPECTION if (!url_to_query->ssl) +#endif { - if (map_block_killer(exports, "https")) + if (map_block_killer(exports, "https-and-no-https-inspection")) { free_current_action(action); free_map(exports); @@ -1751,7 +1717,7 @@ jb_err cgi_robots_txt(struct client_state *csp, * * Function : show_defines * - * Description : Add to a map the state od all conditional #defines + * Description : Add to a map the state of all conditional #defines * used when building * * Parameters : @@ -1793,6 +1759,14 @@ static jb_err show_defines(struct map *exports) 1, #else 0, +#endif + }, + { + "FEATURE_BROTLI", +#ifdef FEATURE_BROTLI + 1, +#else + 0, #endif }, { @@ -1865,6 +1839,14 @@ static jb_err show_defines(struct map *exports) 1, #else 0, +#endif + }, + { + "FEATURE_HTTPS_INSPECTION", +#ifdef FEATURE_HTTPS_INSPECTION + 1, +#else + 0, #endif }, {