Name

headers — set and parse HTTP headers.

Synopsis

headers (set | redirect | add | type | numeric)

Description

The headers command is for setting and parsing HTTP headers.

headers set ?headername? ?value?
Set arbitrary header names and values.
headers redirect ?uri?
Redirect from the current page to a new URI. Must be done in the first block of TCL code.
headers add ?headername? ?value?
Add text to header headername.
headers type ?content-type?
This command sets the Content-type header returned by the script, which is useful if you wish to send content other than HTML with Rivet - PNG or jpeg images, for example.
headers numeric ?response code?
Set a numeric response code, such as 200, 404 or 500.