-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.106 2009/09/10 14:45:17 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.110 2010/07/21 14:29:59 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
#define hash_forward_socks4a 2639958518ul /* "forward-socks4a" */
#define hash_forward_socks5 3963965522ul /* "forward-socks5" */
#define hash_forwarded_connect_retries 101465292ul /* "forwarded-connect-retries" */
+#define hash_handle_as_empty_returns_ok 1444873247ul /* "handle-as-empty-doc-returns-ok" */
#define hash_hostname 10308071ul /* "hostname" */
#define hash_keep_alive_timeout 3878599515ul /* "keep-alive-timeout" */
#define hash_listen_address 1255650842ul /* "listen-address" */
list_remove_all(config->trust_info);
#endif /* def FEATURE_TRUST */
- for (i = 0; i < MAX_AF_FILES; i++)
- {
- freez(config->re_filterfile[i]);
- }
-
freez(config);
}
config->feature_flags &= ~RUNTIME_FEATURE_CGI_TOGGLE;
config->feature_flags &= ~RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
config->feature_flags &= ~RUNTIME_FEATURE_ACCEPT_INTERCEPTED_REQUESTS;
+ config->feature_flags &= ~RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK;
configfp = fopen(configfile, "r");
if (NULL == configfp)
config->forwarded_connect_retries = atoi(arg);
break;
+/* *************************************************************************
+ * handle-as-empty-doc-returns-ok 0|1
+ *
+ * Workaround for firefox hanging on blocked javascript pages.
+ * Block with the "+handle-as-empty-document" flag and set the
+ * "handle-as-empty-doc-returns-ok" run-time config flag so that
+ * Privoxy returns a 200/OK status instead of a 403/Forbidden status
+ * to the browser for blocked pages.
+ ***************************************************************************/
+ case hash_handle_as_empty_returns_ok:
+ if ((*arg != '\0') && (0 != atoi(arg)))
+ {
+ config->feature_flags |= RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK;
+ }
+ else
+ {
+ config->feature_flags &= ~RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK;
+ }
+ break;
+
/* *************************************************************************
* hostname hostname-to-show-on-cgi-pages
* *************************************************************************/
* In logdir by default
* *************************************************************************/
case hash_logfile :
- if (!no_daemon)
+ if (daemon_mode)
{
logfile = make_path(config->logdir, arg);
if (NULL == logfile)
freez(config->logfile);
- if (!no_daemon)
+ if (daemon_mode)
{
if (NULL != logfile)
{
#if defined(_WIN32) && !defined (_WIN_CONSOLE)
g_default_actions_file = config->actions_file[1]; /* FIXME Hope this is default.action */
- g_user_actions_file = config->actions_file[2]; /* FIXME Hope this is user.action */
- g_re_filterfile = config->re_filterfile[0]; /* FIXME Hope this is default.filter */
+ g_user_actions_file = config->actions_file[2]; /* FIXME Hope this is user.action */
+ g_default_filterfile = config->re_filterfile[0]; /* FIXME Hope this is default.filter */
+ g_user_filterfile = config->re_filterfile[1]; /* FIXME Hope this is user.filter */
#ifdef FEATURE_TRUST
g_trustfile = config->trustfile;