There is an implication in using 'headers numeric 302' with the buffer
control handling.

I don't see any need for reducing the channel buffer size (especially
since the rivet channel handling was modified in order to have a single
channel per thread) but I tested the case where the buffer size was
shrunk to a length short enough to cause several buffer outputs on a
single page. I put a conditional redirect near the end of the page and
triggered the redirection. The page don't divert (because headers had
been flushed already), it stops outputting data, but it doesn't fail either.

What the behavior we expect in this case (it would imply we should call?
I would expect the page to fail or return a some special code in order
to give us a chance to abort redirection and maybe take some action.

What do you think?

 -- Massimo


On 12/15/2014 11:00 PM, Damon Courtney wrote:
> I had thought about that. I would vote for something extensible like a dict 
> with a required field.
> 
> ## For a straight abort_page
> set d [dict create]
> dict set d error_code “abort”
> 
> ## For a redirect
> set d [dict create]
> dict set d error_code “redirect”
> dict set d location [headers set Location]
> 
> Or whatever. error_code being very Tcl’ish and the only required value. The 
> others are dependent on the error_code value. It’s simple, and we can add 
> other codes with other information later.
> 
> D
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to