suve

awful: function: http-header

Declaration

NIL :http-header ( string $NAME , string $CONTENT )
NIL :http-header ( string $NAME )

Summary

:!: Available only in CGI mode.
Outside CGI mode, headers can be printed simply by performing a
:writeln call.

Sets the content of NAME HTTP Header to CONTENT, or unsets the header if no content is provided. Multiple headers of the same name are not allowed; a second call with the same name will override the content set by the previous one. Also, since HTTP headers are case-insensitive, this will hold true even if you perform the second call with the name written with differing letter cases.

Remember that, since headers must be sent before page content, all calls to this function must be performed before any actual output.

Example

# HTTP Header example
:http-header s'X-Powered-By' :add s'awful rev.' =AWFUL-REVISION

wikistrona zmodyfikowana 2014/0601/2317