HTTP-response headers


The field corresponds with HTTP-response header generated by Parser. It can be both assigned and referred to. The value may be a date, a string or a hash with obligatory key

Note: before assigning or referring value, field name is converted to uppercase letters.   [3.4.4]
Note: during output to the browser all HTTP-response headers' names are capitalized (for example:
content-type are transformed to Content-Type).   [3.4.0]
assign empty value to remove header.   [3.4.4]
Note: if
$response:status value is set to less than 100, this value will be returned as the exit code of the parser process.   [3.4.5]

Example of redirecting a visitor to site's mainpage
#works if web-site administrator correctly configured SERVER_NAME environment variable
usually he/she did

Another example of redirecting a visitor to site's mainpage
#works regardless of SERVER_NAME 

Example of assigning header "expires" a value "tomorrow"

Copyright © 1997–2021 Art. Lebedev Studio | Last updated: 26.04.2017