We are trying to port a big CGI application written in TCL to mod_dtcl.
In some cases, the application
calls a CGI setting the same variable to more than a value, like in this
example (for a GET):

http://valerio.private/valerio/test.tcl?x=v1&x=v2&x=v3

Internally our code parsed the URL making something equivalent to

set $x "v1|||v2|||v3"

using "|||" as a separator. We patched the source code of mod_dtcl to
comply with this
format, and I think something similar (eventually more flexible) should
be included in the module.

Here is the patch:

$ diff  mod_dtcl.c mod_dtcl.c.orig
745,753c745
<             /* XXX Patch: if the variable is already defined, append
the new value using "|||" as a separator */
<
<           if (Tcl_ObjGetVar2(interp, varsobj,
STRING_TO_UTF_TO_OBJ(parms[i].key), 0) )
<                  {
<                   Tcl_ObjSetVar2(interp, varsobj,
<                          STRING_TO_UTF_TO_OBJ(parms[i].key),
<                          STRING_TO_UTF_TO_OBJ("|||"),
<                          TCL_APPEND_VALUE );
<                           Tcl_ObjSetVar2(interp, varsobj,
---
>           Tcl_ObjSetVar2(interp, varsobj,
756,762c748
<                          TCL_APPEND_VALUE );
<                    }
<           else
<                   Tcl_ObjSetVar2(interp, varsobj,
<                          STRING_TO_UTF_TO_OBJ(parms[i].key),
<                          STRING_TO_UTF_TO_OBJ(parms[i].val),
<                          0 );
---
>                          0);




Regards,

Valerio Gionco
MOST s.r.l.

--
****************************************************************************
            "Life's not fair, but the root password helps."




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to