You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by Ronnie Brunner <ro...@netcetera.ch> on 2004/04/26 19:37:38 UTC
web::putx problem
Hi guys
Someone pointed out a problem with web::putx. When a channel is given
to the command (i.e. [web::putx <channel> $code]) the channel is not reset
after the call. It will still be set to <channel>.
I think I remember that we talked about that years ago. A fix was even
partly in place: in webout.c, the original response is saved (line 104)
savedObj = outData->defaultResponseObj;
but the corresponding call to set it back is omitted:
outData->defaultResponseObj = savedObj;
Adding this brings up a different problem. When the output is changed
globally during a call to [web::putx], it will be set back by [web::putx]
instead of being kept at the newly set value.
What is the smaller problem to live with? I'd say that it is very
rarely a useful case to globally set a new channel during evaluation
within a [web::putx] w/o setting it back within the same context, so I
tend to favor the fix that sets back the channel after
[web::putx <channel> $code] even if it might break the
[web::response -set <channel>] within a [web::putx] or [web::putxfile].
If noone objects, I'll commit that in a couple of days.
Thx
Ronnie
----------------------------------------------------------------------
Ronnie Brunner ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org