Nut/OS  5.0.5
API Reference
envvars.h File Reference
#include <isc/list.h>
#include <pro/uhttp/uhttpd.h>
Include dependency graph for envvars.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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_ENTRYEnvVarGetEntry (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.