tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <>
Subject Re: putx of empty string before first brace does not send headers
Date Wed, 26 Dec 2001 17:06:31 GMT
> test putx-3.7 {putx of empty string before first brace does not send headers} {
>     web::response -select #buf-putx-37
>     web::config putxmarkup tag
>     set res [web::putx {<?web::response -sendheader 0?>}]
>     web::config putxmarkup brace
>     set ::buf-putx-37
> } {}
> I have some reservations about this.
> Positives: 
>         Makes it possible to fool around with the headers.

This is a must. I don't think we could live without it.

> Negatives:
>         Requires coding around things in the parser.

I see that.

>         Arbitrary - including even a " " will make it not work
>         correctly.  This might confuse people.

I only partially have a problem with this. Meddling with headers only
works as long as you haven't sent anything over the channel: '' is
nothing vs. ' ' is something.

> I avoided this in mod_dtcl by buffering the first bit of non-Tcl, so
> that instead of having to make sure there is no space, you can
> manipulate headers in the first chunk of Tcl code (or you can set up
> buffering there so that you can manipulate headers wherever you want).

Does that really solve the problem of "coding around things"? Would
you always buffer the first non-Tcl junk? Buffering as such requires
some "coding around things", or am I wrong?

The key feature we need is the ability to fiddle around with headers
in a "ASP"-style template environment: mod_websh setup that just
"web::putxfile"s a file from the file system.

I wouldn't mind if we need to put some preparing statements in the
handling code for the templates such as turn on buffering or
something, but it would need to be something that does not have any
impact on the later execution of the template.

What would your solution look like?

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

View raw message