Helma logo
helma.org » Home > Stories > res.status

res.status

Sets the response's HTTP-status code.

This property defines the status code of the HTTP response.
Like any HTTP-Server Helma can send the client software additional information describing the response. For a list of all codes and their meaning see RFC 2616.
One of the common usages is to deny access and ask for authentication by responding with status code 401. The client software usually responds by asking the user for username and password.
The default value is 200 which is the code for "OK".

Syntax
res.status

Example
res.status = 401;
//make sure to set res.realm as well when asking for http authentication
res.realm = "Helma protected area";


... comment


Page last modified on 2005-02-02 16:57 by rist