-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.43 2006/07/18 14:48:45 david__schmidt Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.44 2006/12/09 13:49:16 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
*
* Revisions :
* $Log: cgiedit.c,v $
+ * Revision 1.44 2006/12/09 13:49:16 fabiankeil
+ * Fix configure option --disable-toggle.
+ * Thanks to Peter Thoenen for reporting this.
+ *
* Revision 1.43 2006/07/18 14:48:45 david__schmidt
* Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
* with what was really the latest development (the v_3_0_branch branch)
if (!err) err = actions_to_radio(exports, cur_line->data.action);
+ /*
+ * XXX: Some browsers (at least IE6 and IE7) have an artifical URL
+ * length limitation and ignore clicks on the Submit buttons if
+ * the resulting GET URL would be longer than their limit.
+ *
+ * In Privoxy 3.0.5 beta the standard edit-actions-for-url template
+ * reached this limit and action editing stopped working in these
+ * browsers (BR #1570678).
+ *
+ * The config option split-large-forms works around this browser
+ * bug (HTTP has no URL lenght limitation) by deviding the action
+ * list form into multiple smaller ones. It means the URLs are shorter
+ * and work in broken browsers as well, but the user can no longer change
+ * all actions with one submit.
+ *
+ * A better solution would be to switch to POST requests,
+ * but this will do for now.
+ */
+ if(!err && (csp->config->feature_flags & RUNTIME_FEATURE_SPLIT_LARGE_FORMS))
+ {
+ /* Generate multiple smaller form by killing the big one. */
+ err = map_block_killer(exports, "one-form-only");
+ }
+ else
+ {
+ /* Default: Generate one large form by killing the smaller ones. */
+ err = map_block_killer(exports, "multiple-forms");
+ }
+
for (i = 0; i < MAX_AF_FILES; i++)
{
if ((csp->rlist[i] != NULL) && (csp->rlist[i]->f != NULL))
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.55 2006/11/28 15:31:52 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.56 2006/12/17 17:04:51 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.56 2006/12/17 17:04:51 fabiankeil
+ * Move the <br> in the generated HTML for the config
+ * options from the beginning of the string to its end.
+ * Keeps the white space in balance.
+ *
* Revision 1.55 2006/11/28 15:31:52 fabiankeil
* Fix memory leak in case of config file reloads.
*
#define hash_permit_access 3587953268ul /* "permit-access" */
#define hash_proxy_info_url 3903079059ul /* "proxy-info-url" */
#define hash_single_threaded 4250084780ul /* "single-threaded" */
+#define hash_split_large_cgi_forms 671658948ul /* "split-large-cgi-forms" */
#define hash_suppress_blocklists 1948693308ul /* "suppress-blocklists" */
#define hash_toggle 447966ul /* "toggle" */
#define hash_trust_info_url 430331967ul /* "trust-info-url" */
config->proxy_args = strdup("");
config->forwarded_connect_retries = 0;
config->feature_flags &= ~RUNTIME_FEATURE_CGI_TOGGLE;
+ config->feature_flags &= ~RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
if ((configfp = fopen(configfile, "r")) == NULL)
{
config->multi_threaded = 0;
continue;
+/* *************************************************************************
+ * split-large-cgi-forms
+ * *************************************************************************/
+ case hash_split_large_cgi_forms :
+ if ((*arg != '\0') && (0 != atoi(arg)))
+ {
+ config->feature_flags |= RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
+ }
+ else
+ {
+ config->feature_flags &= ~RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
+ }
+ continue;
+
/* *************************************************************************
* toggle (0|1)
* *************************************************************************/
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.82 2006/09/20 15:50:31 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.83 2006/12/06 19:26:29 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.83 2006/12/06 19:26:29 fabiankeil
+ * Moved HTTP snipplets into jcc.c. They aren't
+ * used anywhere else.
+ *
* Revision 1.82 2006/09/20 15:50:31 fabiankeil
* Doubled size of HOSTENT_BUFFER_SIZE to mask
* problems with gethostbyname_r and some
/** configuration_spec::feature_flags: HTTP-header-based toggle. */
#define RUNTIME_FEATURE_HTTP_TOGGLE 4
+/** configuration_spec::feature_flags: Split large forms to limit the number of GET arguments. */
+#define RUNTIME_FEATURE_SPLIT_LARGE_FORMS 8
+
/**
* Data loaded from the configuration file.
*
* - RUNTIME_FEATURE_CGI_EDIT_ACTIONS
* - RUNTIME_FEATURE_CGI_TOGGLE
* - RUNTIME_FEATURE_HTTP_TOGGLE
+ * - RUNTIME_FEATURE_SPLIT_LARGE_FORMS
*/
unsigned feature_flags;