Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

http.h File Reference

Go to the source code of this file.

Typedefs

typedef http_s http_t

Enumerations

enum  {
  HTTP_STATUS_EMPTY = 0, HTTP_STATUS_OK = 200, HTTP_STATUS_CREATED = 201, HTTP_STATUS_ACCEPTED = 202,
  HTTP_STATUS_NO_CONTENT = 204, HTTP_STATUS_MOVED_PERMANENTLY = 301, HTTP_STATUS_MOVED_TEMPORARILY = 302, HTTP_STATUS_NOT_MODIFIED = 304,
  HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_UNAUTHORIZED = 401, HTTP_STATUS_FORBIDDEN = 403, HTTP_STATUS_NOT_FOUND = 404,
  HTTP_STATUS_LENGTH_REQUIRED = 411, HTTP_STATUS_REQUEST_TOO_LARGE = 413, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HTTP_STATUS_NOT_IMPLEMENTED = 501,
  HTTP_STATUS_BAD_GATEWAY = 502, HTTP_STATUS_SERVICE_UNAVAILABLE = 503
}
enum  http_method_e {
  HM_UNKNOWN, HM_GET, HM_HEAD, HM_POST,
  HM_PUT, HM_DELETE
}

Functions

u_config_t * http_get_config (http_t *http)
session_opt_shttp_get_session_opt (http_t *http)
int http_alias_resolv (http_t *h, char *dst, const char *filename, size_t sz)
const char * http_get_status_desc (int status)


Detailed Description

Definition in file http.h.


Typedef Documentation

typedef struct http_s http_t
 

Definition at line 74 of file http.h.

Referenced by http_alias_resolv(), http_backend_init(), http_backend_serve(), http_backend_term(), http_get_config(), http_get_session_opt(), request_create(), request_get_http(), and response_create().


Enumeration Type Documentation

anonymous enum
 

HTTP response codes

Enumeration values:
HTTP_STATUS_EMPTY  undefined status
HTTP_STATUS_OK  request succeeded
HTTP_STATUS_CREATED  fulfilled request resulting in creation of new resource
HTTP_STATUS_ACCEPTED  request accepted but processing not completed
HTTP_STATUS_NO_CONTENT  no body returned
HTTP_STATUS_MOVED_PERMANENTLY  resource relocated permanently
HTTP_STATUS_MOVED_TEMPORARILY  resource relocated temporarily
HTTP_STATUS_NOT_MODIFIED  GET request for unmodified document
HTTP_STATUS_BAD_REQUEST  syntax error
HTTP_STATUS_UNAUTHORIZED  user authentication required
HTTP_STATUS_FORBIDDEN  access to resource forbidden
HTTP_STATUS_NOT_FOUND  nothing found at matching request URI
HTTP_STATUS_LENGTH_REQUIRED  missing Content-Length header field
HTTP_STATUS_REQUEST_TOO_LARGE  request PDU too big
HTTP_STATUS_INTERNAL_SERVER_ERROR  unexpected condition caused an error
HTTP_STATUS_NOT_IMPLEMENTED  request method not supported
HTTP_STATUS_BAD_GATEWAY  invalid response while acting as gateway or proxy
HTTP_STATUS_SERVICE_UNAVAILABLE  server unavailable due to temporary overloading or maintenance

Definition at line 23 of file http.h.

enum http_method_e
 

HTTP Methods

Enumeration values:
HM_UNKNOWN  unknown value
HM_GET  retrieve data at URI
HM_HEAD  ~HM_GET with headers only
HM_POST  create new object subordinate to specified object
HM_PUT  data in body is to be stored under URL
HM_DELETE  deletion request at given URL

Definition at line 63 of file http.h.


Function Documentation

int http_alias_resolv http_t h,
char *  dst,
const char *  filename,
size_t  sz
 

Definition at line 91 of file http.c.

References http_s::config, http_s::dir_root, and http_t.

u_config_t* http_get_config http_t http  ) 
 

Definition at line 69 of file http.c.

References http_s::config, and http_t.

struct session_opt_s* http_get_session_opt http_t http  ) 
 

Definition at line 62 of file http.c.

References http_t, http_s::sess_opt, and session_opt_t.

const char* http_get_status_desc int  status  ) 
 

Definition at line 76 of file http.c.

Referenced by response_get_max_header_size().


←Products
© 2005-2006 - KoanLogic S.r.l. - All rights reserved