From: Fabian Keil Date: Sat, 30 Aug 2008 12:03:09 +0000 (+0000) Subject: Remove FEATURE_COOKIE_JAR. X-Git-Tag: v_3_0_11~260 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=8ef1cce0e3dfe6b68730d19d68cbb628219ebf39 Remove FEATURE_COOKIE_JAR. --- diff --git a/GNUmakefile.in b/GNUmakefile.in index bf9fd650..db4772e7 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,6 @@ # Note: Makefile is built automatically from Makefile.in # -# $Id: GNUmakefile.in,v 1.173 2008/06/18 18:28:42 fabiankeil Exp $ +# $Id: GNUmakefile.in,v 1.174 2008/07/18 17:50:47 fabiankeil Exp $ # # Written by and Copyright (C) 2001 - 2008 the SourceForge # Privoxy team. http://www.privoxy.org/ @@ -285,7 +285,6 @@ inifiles: $(W32_INIS) config.txt: config $(SED) -e 's!\trustfile trust!trustfile trust.txt!' \ - -e 's!\jarfile jarfile!jarfile jar.log!' \ -e 's!\logfile logfile!logfile privoxy.log!' \ -e 's!#Win32-only: !!' \ < $< | \ @@ -1153,16 +1152,16 @@ install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T fi ;\ [ ! -f $(DESTDIR)$(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(DESTDIR)$(LOG_DEST) || \ $(ECHO) Checking logfiles in $(DESTDIR)$(LOG_DEST) ;\ - $(TOUCH) $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(LOG_DEST)/jarfile || exit 1 ;\ + $(TOUCH) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\ if [ x$$USER != x ]; then \ - $(CHOWN) $$USER $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(LOG_DEST)/jarfile || \ + $(CHOWN) $$USER $(DESTDIR)$(LOG_DEST)/logfile || \ $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\ fi ;\ if [ x$$GROUP_T != x ]; then \ - $(CHGRP) $$GROUP_T $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(LOG_DEST)/jarfile || \ + $(CHGRP) $$GROUP_T $(DESTDIR)$(LOG_DEST)/logfile || \ $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\ fi ;\ - $(CHMOD) $(RWD_MODE) $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(LOG_DEST)/jarfile || exit 1 ;\ + $(CHMOD) $(RWD_MODE) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\ if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \ if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \ $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \ @@ -1236,9 +1235,9 @@ uninstall: CONF_DEST LOG_DEST PID_DEST check_doc -$(RM) $(DESTDIR)$(MAN_DEST)/privoxy.1* -$(RM) -r $(DESTDIR)$(DOC_DEST) || $(RM) -r $(DESTDIR)$(prefix)/doc/privoxy - @# Log and jarfile and pidfile + @# Log and pidfile @$(ECHO) Removing $(PROGRAM) logs - -$(RM) $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(PID_DEST)/privoxy.pid $(DESTDIR)$(LOG_DEST)/jarfile + -$(RM) $(DESTDIR)$(LOG_DEST)/logfile $(DESTDIR)$(PID_DEST)/privoxy.pid @# Final clean up of unused directories. Special handling of CONF and LOG # destinations. @@ -1309,6 +1308,9 @@ coffee: ## end: # $Log: GNUmakefile.in,v $ +# Revision 1.174 2008/07/18 17:50:47 fabiankeil +# Fix whitespace. +# # Revision 1.173 2008/06/18 18:28:42 fabiankeil # Remove PDF-related stuff. # diff --git a/cgisimple.c b/cgisimple.c index e1c2c1ae..08bb8c85 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.86 2008/06/28 14:19:05 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.87 2008/08/29 15:59:22 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -36,6 +36,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.86 2008/06/28 14:19:05 fabian * * Revisions : * $Log: cgisimple.c,v $ + * Revision 1.87 2008/08/29 15:59:22 fabiankeil + * Fix two comments. + * * Revision 1.86 2008/06/28 14:19:05 fabiankeil * Protocol detection is done case-insensitive, fix assertion * to do the same. Yay for Privoxy-Regression-Test and zzuf. @@ -1874,12 +1877,6 @@ static jb_err show_defines(struct map *exports) if (!err) err = map_conditional(exports, "FEATURE_CGI_EDIT_ACTIONS", 0); #endif /* ndef FEATURE_CGI_EDIT_ACTIONS */ -#ifdef FEATURE_COOKIE_JAR - if (!err) err = map_conditional(exports, "FEATURE_COOKIE_JAR", 1); -#else /* ifndef FEATURE_COOKIE_JAR */ - if (!err) err = map_conditional(exports, "FEATURE_COOKIE_JAR", 0); -#endif /* ndef FEATURE_COOKIE_JAR */ - #ifdef FEATURE_FAST_REDIRECTS if (!err) err = map_conditional(exports, "FEATURE_FAST_REDIRECTS", 1); #else /* ifndef FEATURE_FAST_REDIRECTS */ diff --git a/configure.in b/configure.in index e381b45a..685b0dff 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl $Id: configure.in,v 1.119 2008/08/13 16:53:50 fabiankeil Exp $ +dnl $Id: configure.in,v 1.120 2008/08/21 17:19:50 fabiankeil Exp $ dnl dnl Written by and Copyright (C) 2001-2008 the SourceForge dnl Privoxy team. http://www.privoxy.org/ @@ -28,6 +28,9 @@ dnl or write to the Free Software Foundation, Inc., 59 dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl dnl $Log: configure.in,v $ +dnl Revision 1.120 2008/08/21 17:19:50 fabiankeil +dnl Change version to 3.0.11 UNRELEASED. +dnl dnl Revision 1.119 2008/08/13 16:53:50 fabiankeil dnl Change version to 3.0.10 stable. dnl @@ -544,7 +547,7 @@ dnl ================================================================= dnl AutoConf Initialization dnl ================================================================= -AC_REVISION($Revision: 1.119 $) +AC_REVISION($Revision: 1.120 $) AC_INIT(jcc.c) if test ! -f config.h.in; then @@ -1319,13 +1322,6 @@ AC_ARG_ENABLE(trust-files, fi], AC_DEFINE(FEATURE_TRUST)) -AC_ARG_ENABLE(jar-files, -[ --disable-jar-files Prevents the use of jar files to capture cookies.], -[if test $enableval = yes; then - AC_DEFINE(FEATURE_COOKIE_JAR) -fi], -AC_DEFINE(FEATURE_COOKIE_JAR)) - AC_ARG_ENABLE(editor, [ --disable-editor Prevents the use of the web-based actions file editor and web-based temporary disable setting.], diff --git a/doc/source/p-config.sgml b/doc/source/p-config.sgml index 68538d39..603e1ede 100644 --- a/doc/source/p-config.sgml +++ b/doc/source/p-config.sgml @@ -3,7 +3,7 @@ Purpose : Used with other docs and files only. - $Id: p-config.sgml,v 2.30 2008/03/27 18:31:20 fabiankeil Exp $ + $Id: p-config.sgml,v 2.31 2008/06/14 13:16:40 fabiankeil Exp $ Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/ See LICENSE. @@ -95,7 +95,7 @@ Sample Configuration File for Privoxy v&p-version; - $Id: p-config.sgml,v 2.30 2008/03/27 18:31:20 fabiankeil Exp $ + $Id: p-config.sgml,v 2.31 2008/06/14 13:16:40 fabiankeil Exp $ Copyright (C) 2001-2008 Privoxy Developers http://www.privoxy.org/ @@ -604,8 +604,7 @@ II. FORMAT OF THE CONFIGURATION FILE The directory where all logging takes place - (i.e. where logfile and - jarfile are located). + (i.e. where the logfile is located). @@ -871,59 +870,6 @@ actionsfile - -jarfile - - - - Specifies: - - - The file to store intercepted cookies in - - - - - Type of value: - - File name, relative to logdir - - - - Default value: - - Unset (commented out). When activated: jarfile (Unix) or privoxy.jar (Windows). - - - - Effect if unset: - - - Intercepted cookies are not stored in a dedicated log file. - - - - - Notes: - - - The jarfile may grow to ridiculous sizes over time. - - - If debug 8 (show header parsing) is enabled, cookies are - also written to the logfile with the rest of the headers. - Therefore this option isn't very useful and may be removed - in future releases. Please report to the developers if you - are still using it. - - - - - -@@#jarfile jarfile]]> - - - trustfile diff --git a/jcc.c b/jcc.c index f150b580..e76358ba 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.183 2008/08/21 07:09:35 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.184 2008/08/22 15:34:45 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,12 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.183 2008/08/21 07:09:35 fabiankeil Exp $" * * Revisions : * $Log: jcc.c,v $ + * Revision 1.184 2008/08/22 15:34:45 fabiankeil + * - Silence LLVM/Clang complaint. + * - Make received_hup_signal static. + * - Hide definitions for basedir, pidfile and received_hup_signal + * from __EMX__ as they only seem to be used in case of #ifdef unix. + * * Revision 1.183 2008/08/21 07:09:35 fabiankeil * Accept Shoutcast responses again. Problem reported * and fix suggested by Stefan in #2062860. @@ -3577,23 +3583,6 @@ static void listen_loop(void) } #endif -#ifdef __OS2__ -#ifdef FEATURE_COOKIE_JAR - /* - * Need a workaround here: we have to fclose() the jarfile, or we die because it's - * already open. I think unload_configfile() is not being run, which should do - * this work. Until that can get resolved, we'll use this workaround. - */ - if (csp) - if(csp->config) - if (csp->config->jar) - { - fclose(csp->config->jar); - csp->config->jar = NULL; - } -#endif /* FEATURE_COOKIE_JAR */ -#endif /* __OS2__ */ - if ( NULL == (csp = (struct client_state *) zalloc(sizeof(*csp))) ) { log_error(LOG_LEVEL_FATAL, "malloc(%d) for csp failed: %E", sizeof(*csp)); @@ -3891,13 +3880,6 @@ static void listen_loop(void) #endif freez(configfile); -#ifdef FEATURE_COOKIE_JAR - if (NULL != config->jar) - { - fclose(config->jar); - } -#endif - #if defined(_WIN32) && !defined(_WIN_CONSOLE) /* Cleanup - remove taskbar icon etc. */ TermLogWindow(); diff --git a/loadcfg.c b/loadcfg.c index 59a38904..d3b4a2b0 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,4 +1,4 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.77 2008/05/26 16:13:22 fabiankeil Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.78 2008/08/02 08:23:22 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ @@ -35,6 +35,12 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.77 2008/05/26 16:13:22 fabiankeil * * Revisions : * $Log: loadcfg.c,v $ + * Revision 1.78 2008/08/02 08:23:22 fabiankeil + * If the enforce-blocks directive is used with FEATURE_FORCE_LOAD + * disabled, log a message that blocks will always be enforced + * instead of complaining about an unrecognized directive. + * Reported by Pietro Leone. + * * Revision 1.77 2008/05/26 16:13:22 fabiankeil * Reuse directive_hash and don't hash the same directive twice. * @@ -558,7 +564,6 @@ static struct file_list *current_configfile = NULL; #define hash_forward_socks5 3963965522ul /* "forward-socks5" */ #define hash_forwarded_connect_retries 101465292ul /* "forwarded-connect-retries" */ #define hash_hostname 10308071ul /* "hostname" */ -#define hash_jarfile 2046641ul /* "jarfile" */ #define hash_listen_address 1255650842ul /* "listen-address" */ #define hash_logdir 422889ul /* "logdir" */ #define hash_logfile 2114766ul /* "logfile" */ @@ -628,14 +633,6 @@ static void unload_configfile (void * data) } config->forward = NULL; -#ifdef FEATURE_COOKIE_JAR - if ( NULL != config->jar ) - { - fclose( config->jar ); - config->jar = NULL; - } -#endif /* def FEATURE_COOKIE_JAR */ - freez(config->confdir); freez(config->logdir); freez(config->templdir); @@ -657,10 +654,6 @@ static void unload_configfile (void * data) freez(config->proxy_args); freez(config->usermanual); -#ifdef FEATURE_COOKIE_JAR - freez(config->jarfile); -#endif /* def FEATURE_COOKIE_JAR */ - #ifdef FEATURE_TRUST freez(config->trustfile); list_remove_all(config->trust_info); @@ -1331,17 +1324,6 @@ struct configuration_spec * load_config(void) } continue; -/* ************************************************************************* - * jarfile jar-file-name - * In logdir by default - * *************************************************************************/ -#ifdef FEATURE_COOKIE_JAR - case hash_jarfile : - freez(config->jarfile); - config->jarfile = make_path(config->logdir, arg); - continue; -#endif /* def FEATURE_COOKIE_JAR */ - /* ************************************************************************* * listen-address [ip][:port] * *************************************************************************/ @@ -1618,9 +1600,6 @@ struct configuration_spec * load_config(void) case hash_enable_edit_actions: case hash_enable_remote_toggle: #endif /* def FEATURE_CGI_EDIT_ACTIONS */ -#ifndef FEATURE_COOKIE_JAR - case hash_jarfile : -#endif /* ndef FEATURE_COOKIE_JAR */ #ifndef FEATURE_ACL case hash_permit_access: #endif /* ndef FEATURE_ACL */ @@ -1710,18 +1689,6 @@ struct configuration_spec * load_config(void) } #endif /* def FEATURE_TRUST */ -#ifdef FEATURE_COOKIE_JAR - if ( NULL != config->jarfile ) - { - if ( NULL == (config->jar = fopen(config->jarfile, "a")) ) - { - log_error(LOG_LEVEL_FATAL, "can't open jarfile '%s': %E", config->jarfile); - /* Never get here - LOG_LEVEL_FATAL causes program exit */ - } - setbuf(config->jar, NULL); - } -#endif /* def FEATURE_COOKIE_JAR */ - if ( NULL == config->haddr ) { config->haddr = strdup( HADDR_DEFAULT ); diff --git a/parsers.c b/parsers.c index 0bcdc422..c5d0a9b3 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.136 2008/05/26 16:02:24 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.137 2008/05/30 15:50:08 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -44,6 +44,10 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.136 2008/05/26 16:02:24 fabiankei * * Revisions : * $Log: parsers.c,v $ + * Revision 1.137 2008/05/30 15:50:08 fabiankeil + * Remove questionable micro-optimizations + * whose usefulness has never been measured. + * * Revision 1.136 2008/05/26 16:02:24 fabiankeil * s@Insufficent@Insufficient@ * @@ -3967,35 +3971,8 @@ static jb_err server_set_cookie(struct client_state *csp, char **header) { time_t now; time_t cookie_time; - struct tm tm_now; - time(&now); -#ifdef FEATURE_COOKIE_JAR - if (csp->config->jar) - { - /* - * Write timestamp into outbuf. - * - * Complex because not all OSs have tm_gmtoff or - * the %z field in strftime() - */ - char tempbuf[ BUFFER_SIZE ]; - -#ifdef HAVE_LOCALTIME_R - tm_now = *localtime_r(&now, &tm_now); -#elif FEATURE_PTHREAD - pthread_mutex_lock(&localtime_mutex); - tm_now = *localtime (&now); - pthread_mutex_unlock(&localtime_mutex); -#else - tm_now = *localtime (&now); -#endif - strftime(tempbuf, BUFFER_SIZE-6, "%b %d %H:%M:%S ", &tm_now); - - /* strlen("set-cookie: ") = 12 */ - fprintf(csp->config->jar, "%s %s\t%s\n", tempbuf, csp->http->host, *header + 12); - } -#endif /* def FEATURE_COOKIE_JAR */ + time(&now); if ((csp->action->flags & ACTION_NO_COOKIE_SET) != 0) { diff --git a/project.h b/project.h index d87e4ef0..6e2c838e 100644 --- a/project.h +++ b/project.h @@ -1,7 +1,7 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.115 2008/05/19 16:57:20 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.116 2008/05/20 16:05:02 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -37,6 +37,9 @@ * * Revisions : * $Log: project.h,v $ + * Revision 1.116 2008/05/20 16:05:02 fabiankeil + * Move parsers structure definition from project.h to parsers.h. + * * Revision 1.115 2008/05/19 16:57:20 fabiankeil * Declare all members of the parsers structure immutable. * @@ -1682,16 +1685,6 @@ struct configuration_spec /** The hostname to show on CGI pages, or NULL to use the real one. */ const char *hostname; -#ifdef FEATURE_COOKIE_JAR - - /** The file name of the cookie jar file */ - const char * jarfile; - - /** The handle to the cookie jar file */ - FILE * jar; - -#endif /* def FEATURE_COOKIE_JAR */ - /** IP address to bind to. Defaults to HADDR_DEFAULT == 127.0.0.1. */ const char *haddr; diff --git a/templates/show-status b/templates/show-status index 43dec31f..380408ca 100644 --- a/templates/show-status +++ b/templates/show-status @@ -229,11 +229,6 @@ @endif-FEATURE_CGI_EDIT_ACTIONS@web-based actions file editor@if-FEATURE_CGI_EDIT_ACTIONS-then@@else-not-FEATURE_CGI_EDIT_ACTIONS@@endif-FEATURE_CGI_EDIT_ACTIONS@. - - FEATURE_COOKIE_JAR - @if-FEATURE_COOKIE_JAR-then@ Yes @else-not-FEATURE_COOKIE_JAR@ No @endif-FEATURE_COOKIE_JAR@ - Allows the use of a cookie jar file to capture cookies. - FEATURE_FAST_REDIRECTS @if-FEATURE_FAST_REDIRECTS-then@ Yes @else-not-FEATURE_FAST_REDIRECTS@ No @endif-FEATURE_FAST_REDIRECTS@