* VERSION: bumped version as 3.2.1
    * src/mod_rivet_ng/mod_rivet.c: more linear determination of the bridge name
    * rivet/packages/formbroker.tcl: introduced key maxlength
diff --git a/ChangeLog b/ChangeLog
index df3bedd..5d1b270 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
+2021-03-07 Massimo Manghi <mxmanghi@apache.org>
+    * VERSION: bumped version as 3.2.1
+    * src/mod_rivet_ng/mod_rivet.c: more linear determination of the bridge name
+    * rivet/packages/formbroker.tcl: introduced key maxlength
+
 2020-11-19 Massimo Manghi <mxmanghi@apache.org>
-	* rivet/rivet/packages/dio/dio.tcl,dio_Mysql.tcl: adding support for
+	* rivet/packages/dio/dio.tcl,dio_Mysql.tcl: adding support for
 	connector specific client arguments
+	* rivet/packages/form/form22.tcl: New from 2.2 package can be
+	configured to return HTML code instead of printing it to stdout
 
 2020-11-02 Massimo Manghi <mxmanghi@apache.org>
 	* doc/xml/directives.xml: SingleThreadExit entry re-elaborated
diff --git a/VERSION b/VERSION
index 944880f..e4604e3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.2.0
+3.2.1
diff --git a/doc/rivet.xml b/doc/rivet.xml
index 0c0391b..177f641 100644
--- a/doc/rivet.xml
+++ b/doc/rivet.xml
@@ -36,7 +36,7 @@
     <!ENTITY lazybridge.xml        SYSTEM "xml/lazybridge.xml" >
     <!ENTITY formbroker.xml        SYSTEM "xml/formbroker.xml" >
     <!ENTITY version	           	  "3.2" >
-    <!ENTITY fullversion           "3.2.0" >
+    <!ENTITY fullversion           "3.2.1" >
     <!ENTITY version2-series	     "2.0,2.1,2.2,2.3,2.4" >
     <!ENTITY version2-generic	     "2.x" >
     <!ENTITY version3-generic      "3.x" >
diff --git a/doc/xml/internals.xml b/doc/xml/internals.xml
index 6e0083d..c7d1db1 100644
--- a/doc/xml/internals.xml
+++ b/doc/xml/internals.xml
@@ -30,8 +30,8 @@
     		mod_rivet to offer a design that could work together with more MPM and
     		hopefully pave the way to support different OS that have no 'fork'
     		call. At the same time we tried to preserve some of the basic
-    		features of mod_rivet when working with the prefork MPM, chiefly the feature of
-    		the Unix fork system call of 'cloning' a parent process
+			features of mod_rivet when working with the prefork MPM, chiefly
+			the feature of the Unix fork system call of 'cloning' a parent process
     		memory into its child, thus allowing fast initialization of interpreters.
     	</para>
     	<para>
@@ -39,34 +39,34 @@
     		loadable modules that are responsible to adapt the module procedural design to
     		a given class of Apache MPMs. This design is open to the development of more
     		MPM bridges coping with different multi-processing models but also to the development of
-    		different approaches to resource consumption and workload balance. Currently we have 3 bridges: 
+    		different approaches to resource consumption and workload balance. Currently we have 3 bridges:
     	</para>
     	<itemizedlist>
-    		<listitem>rivet_prefork_mpm.c: a bridge for the prefork MPM</listitem>
-    		<listitem>rivet_worker_mpm.c: a threaded bridge creating a pool of threads
-    		each running Tcl interpreters and communicating with the worker MPM threads
-    		through a thread safe queue. This bridge is needed by the worker MPM.</listitem>
-    		<listitem>rivet_lazy_mpm.c: a threaded bridge where Tcl threads are
-    		started <quote>on demand</quote>. The bridge creates no threads and Tcl interpreters
-    		at start up and only when requests come in Tcl execution threads are created.
-    		This bridge is explained in detail in the <xref linkend="lazybridge">next section</xref>.     		
-    		Since the resource demand at startup is minimal this bridge should suit
-    		development machines that go through frequent web server restarts.</listitem>
+			<listitem>rivet_prefork_mpm.c: a bridge for the prefork MPM</listitem>
+			<listitem>rivet_worker_mpm.c: a threaded bridge creating a pool of threads
+			each running Tcl interpreters and communicating with the worker MPM threads
+			through a thread safe queue. This bridge is needed by the worker MPM and by
+			any the winnt MPM on Windows.</listitem>
+			<listitem>rivet_lazy_mpm.c: a threaded bridge where Tcl threads are
+			started <quote>on demand</quote>. The bridge creates no threads and Tcl interpreters
+			at start up, only when requests come in Tcl execution threads are created.
+			This bridge is explained in detail in the <xref linkend="lazybridge">next section</xref>.
+			Since the resource demand at startup is minimal this bridge should suit
+			development machines that go through frequent web server restarts.</listitem>
     	</itemizedlist>
     </section>
     <section>
     	<title>mod_rivet MPM Bridge callbacks</title> 
     	<para>
-    		A bridge is a loadable library implementing different ways to handle
-    		specific features needed to mod_rivet. It was originally meant as a way
-    		to handle the prefork/worker/event MPM specificities, at the same time 
-    		avoiding the need to stuff the 
-    		code with conditional statements that would have implied useless complexity (an
-    		instance of the Apache web server can run only an MPM at a time), 
-    		error prone programming and performance costs. 
-    		New bridges could be imagined also to implement different models of workload
-    		and resource management (like the resources demanded by the Tcl interpreters).
-			We designed an interface between the core of mod_rivet and its MPM bridges 
+			A bridge is a loadable library implementing different ways to handle
+			specific features needed to mod_rivet. It was originally meant as a way
+			to handle the prefork/worker/event MPM specificities, at the same time
+			avoiding the need to stuff the code with conditional statements that would
+			have implied useless complexity (an instance of the Apache web server can
+			run only an MPM at a time), error prone programming and performance costs.
+			New bridges could be imagined also to implement different models of workload
+			and resource management (like the resources demanded by the Tcl interpreters).
+			We designed an interface between the core of mod_rivet and its MPM bridges
 			based on a set of functions defined in the rivet_bridge_table structure. 
     	</para>
     	<programlisting>typedef struct _mpm_bridge_table {
diff --git a/rivet/packages/formbroker/formbroker.tcl b/rivet/packages/formbroker/formbroker.tcl
index 3edca9b..f81363f 100644
--- a/rivet/packages/formbroker/formbroker.tcl
+++ b/rivet/packages/formbroker/formbroker.tcl
@@ -1,7 +1,7 @@
 # -- formbroker.tcl
 # 
-# Form validation and sanitation tool. Kindly donated by
-# Karl Lehenbauer (Flightaware.com)
+# Form validation and sanitation tool. Developed starting from
+# code initially donated by Karl Lehenbauer (Flightaware.com)
 #
 # Copyright 2017 The Rivet Team
 #
@@ -25,7 +25,7 @@
 namespace eval FormBroker {
     variable form_definitions   [dict create]
     variable form_list          [dict create]
-    variable string_quote       force_quote
+    variable string_quoting     force_quote
     variable form_count         0
     #
     # response_security_error - issue an error with errorCode
@@ -104,7 +104,7 @@
         force_sanitize_response_strings response {*}$args
 
         foreach var $args {
-            set response($var) [$string_quote $response($var)]
+            set response($var) [$string_quoting $response($var)]
         }
 
     }
@@ -122,7 +122,7 @@
         require_response_vars response {*}$args
 
         foreach var $args {
-            set response($var) [$string_quote $response($var)]
+            set response($var) [$string_quoting $response($var)]
         }
 
     }
@@ -303,19 +303,19 @@
 
         set value [dict get $variable_d var] 
         if {[dict get $variable_d force_quote] || $force_quote_var} {
-            set value  [$string_quote $value]
+            set value  [$string_quoting $value]
         }
         return $valid
     }
 
-    # -- constrain_bounds
+    # -- bounds_consistency
     #
     # During the form creation stage this method is called
     # to correct possible inconsistencies with a field bounds 
     # definition
     #
 
-    proc constrain_bounds {field_type _bounds} {
+    proc bounds_consistency {field_type _bounds} {
         upvar $_bounds bounds
 
         switch $field_type {
@@ -457,10 +457,10 @@
     proc validate { form_name args } {
         variable form_definitions
         variable form_list
-        variable string_quote
+        variable string_quoting
 
         set force_quote_vars 0
-        set arguments        $args
+        set arguments $args
         if {[llength $arguments] == 0} { 
             error "missing required arguments" 
         } elseif {[llength $arguments] > 3} {
@@ -531,7 +531,7 @@
 
                 if {[dict get $variable_d force_quote] || $force_quote_vars} {
 
-                    set response_a($var)  [$string_quote [dict get $variable_d var]]
+                    set response_a($var)  [$string_quoting [dict get $variable_d var]]
 
                 }
             }
@@ -570,7 +570,7 @@
                     set response($var_name) $var
                 } elseif {[info exists default]} {
                     set response($var_name) $default
-                } 
+                }
 
             }
 
@@ -594,7 +594,7 @@
     # -- destroy
     #
     # this method is designed to be called
-    # by an 'trace unset' event on the variable
+    # by a 'trace unset' event on the variable
     # keeping the form description object. 
     #
 
@@ -629,7 +629,7 @@
         variable form_definitions
         variable form_list
         variable form_count
-        variable string_quote
+        variable string_quoting
 
         set form_name "form${form_count}"
         incr form_count
@@ -637,10 +637,10 @@
         catch { namespace delete $form_name }
         namespace eval $form_name {
 
-            foreach cmd { validate failing      \
-                          form_definition       \
-                          result validate_var   \
-                          destroy validation_error \
+            foreach cmd { validate failing          \
+                          form_definition           \
+                          result validate_var       \
+                          destroy validation_error  \
                           response reset } {
                 lappend cmdmap $cmd [list [namespace parent] $cmd [namespace tail [namespace current]]]
             }
@@ -656,7 +656,7 @@
                                                           form_validation FB_OK  \
                                                           failing         {}     \
                                                           default         ""     \
-                                                          quoting         $string_quote]
+                                                          quoting         $string_quoting]
 
         while {[llength $args]} {
 
@@ -671,7 +671,7 @@
                         error [list RIVET INVALID_QUOTING_PROC \
                                           "Non existing quoting proc '$quoting'"]
                     }
-                    set string_quote $quoting
+                    set string_quoting $quoting
                 }
                 continue
 
@@ -734,16 +734,15 @@
 
                 while {[llength $e] > 0} {
                     set e [::lassign $e field_spec]
-                    
                     switch $field_spec {
                         check_routine -
                         validator {
                             set e [::lassign $e validator]
                         }
-                        length -
+                        maxlength -
                         bounds {
                             set e [::lassign $e bounds]
-                            constrain_bounds $field_type bounds
+                            bounds_consistency $field_type bounds
                         }
                         default {
                             set e [::lassign $e default]
@@ -788,10 +787,16 @@
         return [namespace current]::$form_name 
     }
 
-    proc form_exists {form_cmd} {
+    # -- form_exists
+    #
+    # check the existence of the form named 'form_name' in the form broker
+    # database. The check is done by simply checking one of dictionaries that
+    # keep the internal database of form definitions
+
+    proc form_exists {form_command_name} {
         variable form_definitions
 
-        return [dict exists $form_definitions [namespace tail $form_cmd]]
+        return [dict exists $form_definitions [namespace tail $form_command_name]]
     }
 
     proc creategc {varname args} {
diff --git a/src/mod_rivet_ng/mod_rivet.c b/src/mod_rivet_ng/mod_rivet.c
index a19445b..3533e2f 100644
--- a/src/mod_rivet_ng/mod_rivet.c
+++ b/src/mod_rivet_ng/mod_rivet.c
@@ -97,12 +97,10 @@
 static char*
 Rivet_SeekMPMBridge (apr_pool_t* pool)
 {
-    char*           mpm_prefork_bridge = "rivet_prefork_mpm.so";
-    char*           mpm_worker_bridge  = "rivet_worker_mpm.so";
     char*           mpm_bridge_path;
     int             ap_mpm_result;
     apr_status_t    apr_ret;
-    apr_finfo_t finfo;
+    apr_finfo_t     finfo;
 
     /* With the env variable RIVET_MPM_BRIDGE we have the chance to tell mod_rivet 
        what bridge custom implementation we want be loaded */
@@ -112,20 +110,19 @@
         if ((apr_ret = apr_stat(&finfo,mpm_bridge_path,APR_FINFO_MIN,pool)) != APR_SUCCESS)
         {
             ap_log_perror(APLOG_MARK,APLOG_ERR,apr_ret,pool, 
-                         MODNAME ": MPM bridge %s not found", module_globals->mpm_bridge); 
+                          MODNAME ": MPM bridge %s not found", module_globals->mpm_bridge); 
             exit(1);   
         }
         return mpm_bridge_path;
-        
     }
 
     /* we now look into the configuration record */
 
     if (module_globals->mpm_bridge != NULL)
     {
-        char*       proposed_bridge;
+        char* proposed_bridge;
 
-        proposed_bridge = apr_pstrcat(pool,RIVET_MPM_BRIDGE_COMPOSE(module_globals->mpm_bridge),NULL);
+        proposed_bridge = apr_pstrcat(pool,RIVET_DIR,RIVET_MPM_BRIDGE_COMPOSE(module_globals->mpm_bridge),NULL);
         if (apr_stat(&finfo,proposed_bridge,APR_FINFO_MIN,pool) == APR_SUCCESS)
         {
             mpm_bridge_path = proposed_bridge;
@@ -154,11 +151,11 @@
             {
                 /* Since the MPM is not threaded we assume we can load the prefork bridge */
 
-                mpm_bridge_path = apr_pstrdup(pool,mpm_prefork_bridge);
+                mpm_bridge_path = apr_pstrcat(pool,RIVET_MPM_BRIDGE_COMPOSE("prefork"),NULL);
             }
             else
             {
-                mpm_bridge_path = apr_pstrdup(pool,mpm_worker_bridge);
+                mpm_bridge_path = apr_pstrcat(pool,RIVET_MPM_BRIDGE_COMPOSE("worker"),NULL);
             }
         }
         else
@@ -169,9 +166,9 @@
              * give a default to the MPM bridge anyway
              */
 
-            mpm_bridge_path = apr_pstrdup(pool,mpm_worker_bridge);
+            mpm_bridge_path = apr_pstrcat(pool,RIVET_MPM_BRIDGE_COMPOSE("worker"),NULL);
         }
-        mpm_bridge_path = apr_pstrcat(pool,RIVET_DIR,"/mpm/",mpm_bridge_path,NULL);
+        mpm_bridge_path = apr_pstrcat(pool,RIVET_DIR,mpm_bridge_path,NULL);
 
     }
     return mpm_bridge_path;
@@ -371,15 +368,15 @@
     if (apr_dso_load(&dso_handle,module_globals->rivet_mpm_bridge,pPool) == APR_SUCCESS)
     {
         apr_status_t            rv;
-        apr_dso_handle_sym_t    func = NULL;
+        apr_dso_handle_sym_t    bjt = NULL;
 
         ap_log_perror(APLOG_MARK,APLOG_DEBUG,APR_EGENERAL,pTemp,
                      "MPM bridge loaded: %s",module_globals->rivet_mpm_bridge);
 
-        rv = apr_dso_sym(&func,dso_handle,"bridge_jump_table");
+        rv = apr_dso_sym(&bjt,dso_handle,"bridge_jump_table");
         if (rv == APR_SUCCESS)
         {
-            module_globals->bridge_jump_table = (rivet_bridge_table*) func;
+            module_globals->bridge_jump_table = (rivet_bridge_table*) bjt;
         }
         else
         {
@@ -489,8 +486,8 @@
 
         if (s != server && myrsc == root_server_conf) {
             myrsc = RIVET_NEW_CONF(pChild);
-            ap_set_module_config(s->module_config, &rivet_module, myrsc);
-            Rivet_CopyConfig( root_server_conf, myrsc );
+            ap_set_module_config(s->module_config,&rivet_module,myrsc);
+            Rivet_CopyConfig(root_server_conf,myrsc);
         }
 
         myrsc->idx = idx++;
@@ -501,7 +498,7 @@
 
     RIVET_MPM_BRIDGE_CALL(thread_init,pChild,server);
 
-    apr_pool_cleanup_register (pChild,server,Rivet_Finalize,Rivet_Finalize);
+    apr_pool_cleanup_register(pChild,server,Rivet_Finalize,Rivet_Finalize);
 }
 
 
diff --git a/src/mod_rivet_ng/mod_rivet.h b/src/mod_rivet_ng/mod_rivet.h
index f8332da..2e658c2 100644
--- a/src/mod_rivet_ng/mod_rivet.h
+++ b/src/mod_rivet_ng/mod_rivet.h
@@ -342,6 +342,8 @@
 
 #define RIVET_MPM_BRIDGE rivet_bridge_table bridge_jump_table =
 
-#define RIVET_MPM_BRIDGE_COMPOSE(bridge) RIVET_DIR,"/mpm/rivet_",bridge,"_mpm.so"
+/* macro meant to build the ap_pstrcat argument list expansion */
+
+#define RIVET_MPM_BRIDGE_COMPOSE(bridge) "/mpm/rivet_",bridge,"_mpm.so"
 
 #endif /* MOD_RIVET_H */
diff --git a/src/mod_rivet_ng/mod_rivet_common.c b/src/mod_rivet_ng/mod_rivet_common.c
index 5673350..29acd86 100644
--- a/src/mod_rivet_ng/mod_rivet_common.c
+++ b/src/mod_rivet_ng/mod_rivet_common.c
@@ -140,12 +140,11 @@
     return interp;
 }
 
-/*---------------------------------------------------------------------
+/*
  * -- Rivet_RunningScripts
  *
  *
  *
- *---------------------------------------------------------------------
  */
 
 running_scripts* Rivet_RunningScripts ( apr_pool_t* pool,
diff --git a/src/mod_rivet_ng/mod_rivet_generator.c b/src/mod_rivet_ng/mod_rivet_generator.c
index 9944d93..1d7d080 100644
--- a/src/mod_rivet_ng/mod_rivet_generator.c
+++ b/src/mod_rivet_ng/mod_rivet_generator.c
@@ -132,6 +132,12 @@
 
     private->running_conf = RIVET_SERVER_CONF (private->r->server->module_config);
 
+    #ifdef RIVET_DEBUG_BUILD
+        ap_log_error(APLOG_MARK,APLOG_DEBUG,APR_SUCCESS,private->r->server,
+                                MODNAME ": serving '%s' (%d)",private->r->server->server_hostname,
+                                                              private->running_conf->idx);
+    #endif
+
     /* the interp index in the private data can not be changed by a config merge */
 
     interp_obj = RIVET_PEEK_INTERP(private,private->running_conf);
@@ -287,7 +293,7 @@
         RivetCache_Cleanup(private,interp_obj);
     }
 
-    /* URL referenced script execution and exception handling */
+    /* Rivet's master request script execution and exception handling */
 
     if (Tcl_EvalObjEx(interp, private->running->request_processing,0) == TCL_ERROR) 
     {
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 9c36937..6aa6a11 100644
--- a/src/mod_rivet_ng/rivetCore.c
+++ b/src/mod_rivet_ng/rivetCore.c
@@ -1604,7 +1604,7 @@
             status = Tcl_EvalObjEx(interp,cmd,TCL_EVAL_DIRECT);
             Tcl_DecrRefCount(cmd);
 
-        } 
+        }
         else if (STRNEQU(cmd_arg,"-all"))
         {
             Tcl_Obj* dictObj;
@@ -1801,9 +1801,11 @@
         break;
     }
 
-    /* if we are serving a page, we know our server, 
-     * else send null for server
+    /* if we are serving a page, we infer our server
+     * from the request record, otherwise we use the
+     * root server name stored in the module_globals
      */
+
     serverRec = ((private == NULL) || (private->r == NULL)) ? module_globals->server : private->r->server;
 
     ap_log_error (APLOG_MARK, apLogLevel, 0, serverRec, "%s", message);
diff --git a/src/mod_rivet_ng/rivet_prefork_mpm.c b/src/mod_rivet_ng/rivet_prefork_mpm.c
index 7882761..be41c31 100644
--- a/src/mod_rivet_ng/rivet_prefork_mpm.c
+++ b/src/mod_rivet_ng/rivet_prefork_mpm.c
@@ -157,7 +157,7 @@
     rivet_thread_private*   private;
     int                     tcl_status;
 
-    RIVET_PRIVATE_DATA_NOT_NULL (rivet_thread_key, private);
+    RIVET_PRIVATE_DATA_NOT_NULL(rivet_thread_key, private);
 
     module_globals->server_interp->channel = private->channel;
 
@@ -176,7 +176,6 @@
     {
         ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, server, 
                      MODNAME ": Tcl interpreter random number generation reseeding failed");
-        
     }
     return module_globals->server_interp;
 }
diff --git a/src/rivet.h b/src/rivet.h
index 6572647..87a05c8 100644
--- a/src/rivet.h
+++ b/src/rivet.h
@@ -19,8 +19,6 @@
     under the License.
  */
 
-/* $Id$ */
-
 #ifndef _RIVET_H_
 #define _RIVET_H_