tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ron...@netcetera.ch>
Subject Re: putx of empty string before first brace does not send headers
Date Fri, 28 Dec 2001 09:56:32 GMT
> > 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?
> 
> Yes, but the code that results is less ugly, in my opinion, because
> you end up using more standard Tcl things rather than doing it at the
> parser level.

I still have a problem with your "buffering" solution: 

- changing the buffer size and hoping that it is sufficiently large to
  hold the first block is too shaky in my opinion. btw I'm not sure
  whether Tcl actually has to fill the buffer before it flushes
  anything. (The man page just says: "Tcl will normally delay output
  until the buffer is full or the channel is closed." This sounds too
  wage for my taste to be reliable.)

- Doesn't the CGI setup of websh make your solution very ugly?
  Modifying the headers after something is written two the (buffered)
  output requires reading back the buffer (w/o flushing), writing the
  headers and rewriting the previous buffer content. I can't imaginge
  how you want to do this in a not-ugly fashion.

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

Mime
View raw message