redirect — Interrupt processing and divert to a new URL
::rivet::redirect diverts the browser to a new URL and marks the redirection as either permanent in the browser local cache or non permanent (default). Calling ::rivet::redirect causes the script execution to interrupt and control passes to AbortScript, if such script is set, by calling ::rivet::abort_page and passing as abort code a dictionary with 2 keys:
::rivet::redirect drives the redirection by setting the 301 (permanent redirect) or 302 (non permanent redirect) HTTP status codes and attempts to discard the output the script might have already placed in the stdout channel buffer. Therefore the command can fail if
The stdout channel, like any Tcl channels, can be manipulated and if needed its internal buffer streched.