http_low_answer()
 
    NAME
http_low_answer()

LIBRARY
Caudiumlib.

SYNOPSIS
inherit "caudiumlib";
mapping http_low_answer(int errno, string data, void|int dohtml);

DESCRIPTION
Return a response mapping with the error and data specified. The error is in fact the status response, to 200 is HTTP Document follows, and 500 is Internal Server error, etc. The content type returned will always be text/html.

int errno
The HTTP error code to use in the reply, according to HTTP standards.

string data
The data to return.

void|int dohtml
If !=0 the use a valid HTML document as an answer. See make_htmldoc_string() call for informations.
NOTE: This not a Roxen API option.

RETURNS
The HTTP response mapping in the form :
  ([
     "error": errno,
     "data" : data,
     "len"  : strlen(data),
     "type" : "text/html",
    ]);
 
HTML OK CSS