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_REQUEST_TIMEOUT = 408, 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)
const char * http_vhost_config_value (http_t *h, struct request_s *rq, const char *key)
int http_get_vhost_config (http_t *h, struct request_s *rq, u_config_t **pc)
int http_alias_resolv (http_t *h, struct request_s *rq, char *dst, const char *uri, size_t sz)
const char * http_get_status_desc (int status)


Detailed Description

Definition in file http.h.


Enumeration Type Documentation

anonymous enum
 

HTTP response codes

Enumerator:
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  request timeout
HTTP_STATUS_REQUEST_TIMEOUT  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

Enumerator:
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 65 of file http.h.