ec_httpsrv_response_status_set
Name
ec_httpsrv_response_status_set — Sets the HTTP status for the session response
Synopsis
#include "modules/listeners/httpsrv.h"
| int **ec_httpsrv_response_status_set** (
| sess, | |
| | code, | |
| | message)
; | |
ec_httpsrv_session * <var class="pdparam">sess</var>
;
int <var class="pdparam">code</var>
;
const char * <var class="pdparam">message</var>
;
Description
Note
This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.
Sets the HTTP status for the session response.
- sess
-
the session to modify
- code
-
must be any valid HTTP status code number
- message
-
is a (typically) human readable response string
0 if successful, else returns an errno indicating what went wrong. In particular, ENOMEM indicates that insuficient memory was available when copying the provided message to the session, but it may be possible for other errors to occur.
You will typically want to use ec_httpsrv_response_status_set_std instead of this function, as it will set up Connection headers and compression.