X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgi.c;h=15ef2562ad5e7c8544af74f6d20c9b7dddf1e5f1;hp=acae0fe7188bdc8230bdf87b5599f2597a91f291;hb=079d37212054f93b4e113195e9266ad96176d435;hpb=3dfff657b0fc14d0af804e566b69e4d83629ddc6 diff --git a/cgi.c b/cgi.c index acae0fe7..15ef2562 100644 --- a/cgi.c +++ b/cgi.c @@ -7,7 +7,7 @@ * This only contains the framework functions, the * actual handler functions are declared elsewhere. * - * Copyright : Written by and Copyright (C) 2001-2017 + * Copyright : Written by and Copyright (C) 2001-2020 * members of the Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -444,7 +444,9 @@ static int referrer_is_safe(const struct client_state *csp) { char *referrer; static const char alternative_prefix[] = "http://" CGI_SITE_1_HOST "/"; +#ifdef FEATURE_HTTPS_INSPECTION static const char alt_prefix_https[] = "https://" CGI_SITE_1_HOST "/"; +#endif const char *trusted_cgi_referrer = csp->config->trusted_cgi_referrer; referrer = grep_cgi_referrer(csp); @@ -1513,13 +1515,15 @@ static void get_locale_time(char *buf, size_t buffer_size) #elif defined(MUTEX_LOCKS_AVAILABLE) privoxy_mutex_lock(&localtime_mutex); timeptr = localtime(¤t_time); - privoxy_mutex_unlock(&localtime_mutex); #else timeptr = localtime(¤t_time); #endif strftime(buf, buffer_size, "%a %b %d %X %Z %Y", timeptr); +#if !defined(HAVE_LOCALTIME_R) && defined(MUTEX_LOCKS_AVAILABLE) + privoxy_mutex_unlock(&localtime_mutex); +#endif }