tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <>
Subject web::putx problem
Date Mon, 26 Apr 2004 17:37:38 GMT
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.

Ronnie Brunner                   
Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message