Data Structures | |
| struct | _HTTP_ENVVAR_ENTRY |
| Environment variable entry structure. More... | |
Typedefs | |
| typedef const char *(* | HTTP_ENV_HANDLER )(HTTPD_SESSION *, const char *name) |
| Environment handler function type. | |
| typedef const char *(* | HTTP_ENVVAR_HANDLER )(HTTPD_SESSION *, int) |
| Environment variable handler function type. | |
| typedef struct _HTTP_ENVVAR_ENTRY | HTTP_ENVVAR_ENTRY |
| Environment variable entry structure type. | |
Functions | |
| int | EnvInitDefaults (void) |
| Initialize the default environment variables. | |
| int | EnvRegisterVariable (char *name, HTTP_ENVVAR_HANDLER handler, int item) |
| Register an environment variable. | |
| const HTTP_ENVVAR_ENTRY * | EnvVarGetEntry (const char *name) |
| Retrieve entry of a registered environment variable. | |
| const char * | EnvHandler (HTTPD_SESSION *hs, const char *name) |
| Default environment handler. | |
| const char * | HttpStreamInfo (HTTPD_SESSION *hs, int item) |
| Default handler of stream related environment variables. | |
| const char * | HttpSessionInfo (HTTPD_SESSION *hs, int item) |
| Default handler of session related environment variables. | |
Default environment variables | |
| #define | HSITEM_DATE_GMT 1 |
| The current date and time in Greenwich Mean Time. | |
| #define | HSITEM_DATE_LOCAL 2 |
| The current date and time in the server's timezone. | |
| #define | HSITEM_DOCUMENT_NAME 3 |
| The file name of the document requested by the client. | |
| #define | HSITEM_DOCUMENT_ROOT 4 |
| The root directory of this site. | |
| #define | HSITEM_HTTP_ACCEPT_ENCODING 5 |
| The MIME types the requestor will accept. | |
| #define | HSITEM_HTTP_CONNECTION 6 |
| The type of connection. | |
| #define | HSITEM_HTTP_COOKIE 7 |
| The value of any cookie. | |
| #define | HSITEM_HTTP_HOST 8 |
| The base URL of the host. | |
| #define | HSITEM_HTTP_REFERER 9 |
| The URL of the page that made this request. | |
| #define | HSITEM_HTTP_USER_AGENT 10 |
| The browser id or user-agent string identifying the browser. | |
| #define | HSITEM_QUERY_STRING 11 |
| The argument string for this request. | |
| #define | HSITEM_QUERY_STRING_UNESCAPED 12 |
| The argument string for this request. | |
| #define | HSITEM_REQUEST_METHOD 13 |
| The method used for this request. | |
| #define | HSITEM_REQUEST_URI 14 |
| The URI for this request. | |
| #define | HSITEM_SCRIPT_FILENAME 15 |
| The path to the script being executed. | |
| #define | HSITEM_SCRIPT_NAME 16 |
| The file name of the script being executed. | |
| #define HSITEM_DATE_GMT 1 |
The current date and time in Greenwich Mean Time.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_DATE_LOCAL 2 |
The current date and time in the server's timezone.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_DOCUMENT_NAME 3 |
The file name of the document requested by the client.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_DOCUMENT_ROOT 4 |
The root directory of this site.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_ACCEPT_ENCODING 5 |
The MIME types the requestor will accept.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_CONNECTION 6 |
The type of connection.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_COOKIE 7 |
The value of any cookie.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_HOST 8 |
The base URL of the host.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_REFERER 9 |
The URL of the page that made this request.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_HTTP_USER_AGENT 10 |
The browser id or user-agent string identifying the browser.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_QUERY_STRING 11 |
The argument string for this request.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_QUERY_STRING_UNESCAPED 12 |
The argument string for this request.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_REQUEST_METHOD 13 |
The method used for this request.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_REQUEST_URI 14 |
The URI for this request.
Referenced by HttpSessionInfo(), and ISC_LIST().
| #define HSITEM_SCRIPT_FILENAME 15 |
The path to the script being executed.
Referenced by ISC_LIST().
| #define HSITEM_SCRIPT_NAME 16 |
The file name of the script being executed.
Referenced by ISC_LIST().
| typedef const char*(* HTTP_ENV_HANDLER)(HTTPD_SESSION *, const char *name) |
Environment handler function type.
| typedef const char*(* HTTP_ENVVAR_HANDLER)(HTTPD_SESSION *, int) |
Environment variable handler function type.
| typedef struct _HTTP_ENVVAR_ENTRY HTTP_ENVVAR_ENTRY |
Environment variable entry structure type.
| int EnvInitDefaults | ( | void | ) |
Initialize the default environment variables.
References ENVVAR_DEFAULTS, ISC_LIST_APPEND, and ISC_LIST_INIT.
| int EnvRegisterVariable | ( | char * | name, |
| HTTP_ENVVAR_HANDLER | handler, | ||
| int | item | ||
| ) |
Register an environment variable.
| name | Name of the environment variable. |
| handler | This function will be called to retrieve the variable's value. |
| item | Numeric identifier that will be passed to the handler. |
References calloc, _HTTP_ENVVAR_ENTRY::env_handler, _HTTP_ENVVAR_ENTRY::env_index, _HTTP_ENVVAR_ENTRY::env_name, free(), ISC_LIST_APPEND, ISC_LIST_HEAD, ISC_LIST_INSERTBEFORE, ISC_LIST_NEXT, ISC_LIST_UNLINK_TYPE, rc, strcasecmp, and strdup().
| const HTTP_ENVVAR_ENTRY* EnvVarGetEntry | ( | const char * | name | ) |
Retrieve entry of a registered environment variable.
| const char* EnvHandler | ( | HTTPD_SESSION * | hs, |
| const char * | name | ||
| ) |
Default environment handler.
| hs | Pointer to the session info structure. |
| name | Name of the environment variable. |
References _HTTP_ENVVAR_ENTRY::env_handler, _HTTP_ENVVAR_ENTRY::env_index, _HTTP_ENVVAR_ENTRY::env_name, ISC_LIST_HEAD, ISC_LIST_NEXT, NULL, and strcasecmp.
| const char* HttpStreamInfo | ( | HTTPD_SESSION * | hs, |
| int | item | ||
| ) |
Default handler of stream related environment variables.
| hs | Pointer to the session info structure. |
| item | Numeric identifier of the variable. |
References _HTTPD_SESSION::s_stream, and StreamInfo().
Referenced by ISC_LIST().
| const char* HttpSessionInfo | ( | HTTPD_SESSION * | hs, |
| int | item | ||
| ) |
Default handler of session related environment variables.
| hs | Pointer to the session info structure. |
| item | Numeric identifier of the variable. |
$Id$
References ct_close, ct_GET, ct_HEAD, ct_Keep_Alive, ct_POST, free(), gmtime(), HSITEM_DATE_GMT, HSITEM_DATE_LOCAL, HSITEM_DOCUMENT_NAME, HSITEM_DOCUMENT_ROOT, HSITEM_HTTP_ACCEPT_ENCODING, HSITEM_HTTP_CONNECTION, HSITEM_HTTP_COOKIE, HSITEM_HTTP_HOST, HSITEM_HTTP_REFERER, HSITEM_HTTP_USER_AGENT, HSITEM_QUERY_STRING, HSITEM_QUERY_STRING_UNESCAPED, HSITEM_REQUEST_METHOD, HSITEM_REQUEST_URI, HTTP_CONN_KEEP_ALIVE, HTTP_METHOD_GET, HTTP_METHOD_HEAD, HTTP_METHOD_POST, HTTP_ROOT, HttpUrlUnescape(), localtime(), NULL, Rfc1123TimeString(), strdup(), strrchr(), and time().
Referenced by ISC_LIST().