Forum OpenACS Development: Re: Towards OpenACS 5.8

Collapse
8: Re: Towards OpenACS 5.8 (response to 7)
Posted by Gustaf Neumann on
Jim, the tcl "list" command does not quote the result of the broken ns_quotehtml, because it thinks, it does not have to. The result is somewhat weird: in the shell, one can see by the empty line that tcl the value of x is not the empty string. The length of the resulting string is 1, but even Tcl's "scan" refuses to return something from that value.
% set x [ns_quotehtml ""]

% string length $x
1
% scan $x %c 
% set y \u0000; # same with "set y [format %c 0]"

% scan $y %c
0
% expr {$x eq $y}
0
$x is an "invalid character", which looks like only producible from C.

The fix in oacs-5-8 simply checks for the broken ns_quotehtml and uses in that case the slower version. For older versions of the aolserver (e.g. my test installation on alice.wu.ac.at:8000 with aolserver 4.5.0p1) or the latest (with the fix of jeff) OpenACS 5.8 will use the faster C implemented version.

Collapse
10: Re: Towards OpenACS 5.8 (response to 8)
Posted by Jim Lynch on
Gustaf,

when I saw your "string length $x --> 1", I went "whoa!!"

No wonder they didn't compare, and seeing "" isn't enough to assume a zero-length string.

Thanks! Very good debigging tool. (smalling? no, I meant deBUGging)

-Jim

Collapse
11: Re: Towards OpenACS 5.8 (response to 8)
Posted by Jim Lynch on
curious about a few different things...

First, is build of naviserv similar to aolserver in that you would build a tcl against which the naviserv is linked?

and, what about the tcl version? are folks testing tcl-8.6, and is tcl-8.6 vs tcl-8.5 influential on ns_quotehtml?

-Jim

Collapse
12: Re: Towards OpenACS 5.8 (response to 11)
Posted by Gustaf Neumann on
NaviServer is parent and son of aolserver (aolserver was at some time in the past called NaviServer); of course, both are dependent on Tcl (and link-in Tcl).

NaviServer builds against Tcl 8.6, although i would not recommend it right now for production sites. i am already quite happy that openacs 5.8 can use Tcl 8.5 features to remove some obscure constructs from the past.

Concerning ns_quotehtml: the bug is clearly in some recent aolserver versions; tcl8.6 has the same troubles with C-injected invalid chars.