Micro HTTP library. More...
#include <cfg/http.h>
#include <pro/uhttp/compiler.h>
#include <pro/uhttp/streamio.h>
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | _HTTP_REQUEST |
HTTP request information structure. More... | |
struct | _HTTPD_SESSION |
HTTP session information structure. More... | |
Defines | |
#define | HTTP_MAJOR_VERSION 1 |
#define | HTTP_MINOR_VERSION 1 |
#define | HTTP_VERSION 0x11 |
#define | HTTP_ROOT (http_root ? http_root : HTTP_DEFAULT_ROOT) |
Typedefs | |
typedef struct _HTTP_REQUEST | HTTP_REQUEST |
HTTP request information structure type. | |
typedef struct _HTTPD_SESSION | HTTPD_SESSION |
HTTP session information structure type. | |
typedef int(* | HTTP_AUTH_VALIDATOR )(HTTPD_SESSION *) |
HTTP authentication function type. | |
typedef int(* | HTTP_LOC_REDIRECTOR )(HTTPD_SESSION *) |
HTTP redirection function type. | |
Functions | |
int | HttpRegisterRootPath (char *path) |
Register the HTTP server's root directory. | |
int | HttpParseHeader (HTTPD_SESSION *hs) |
Parse HTTP header. | |
int | HttpParseMultipartHeader (HTTPD_SESSION *hs, const char *bnd, long *avail) |
Parse HTTP multipart header. | |
void | HttpSendHeaderTop (HTTPD_SESSION *hs, int status) |
Send initial HTTP response header. | |
void | HttpSendHeaderDate (HTTPD_SESSION *hs, time_t mtime) |
Send HTTP date response header. | |
void | HttpSendHeaderBottom (HTTPD_SESSION *hs, char *type, char *subtype, long bytes) |
Send final HTTP response header. | |
void | HttpSendError (HTTPD_SESSION *hs, int status) |
Send HTTP error response. | |
int | HttpSendRedirection (HTTPD_SESSION *hs, int code,...) |
Send HTTP redirection response. | |
char * | HttpArgParseFirst (HTTP_REQUEST *req) |
Get first argument from an HTTP request line. | |
char * | HttpArgParseNext (HTTP_REQUEST *req) |
Get next argument from an HTTP request line. | |
char * | HttpArgReadNext (HTTPD_SESSION *hs, long *avail) |
Read next argument from an HTTP post request. | |
char * | HttpArgValue (HTTP_REQUEST *req) |
Get value of the last read argument. | |
const char * | HttpArgValueSub (const char *str, const char *name, int *len) |
Retrieve parameter value from HTTP header line. | |
void | HttpdClientHandler (HTTP_STREAM *sp) |
Default client handler. | |
Variables | |
char * | http_root |
HTTP_AUTH_VALIDATOR | httpd_auth_validator |
HTTP authentication function pointer. | |
HTTP_LOC_REDIRECTOR | httpd_loc_redirector |
HTTP redirection function pointer. | |
HTTP request methods | |
#define | HTTP_METHOD_GET 1 |
Get method. | |
#define | HTTP_METHOD_POST 2 |
Post method. | |
#define | HTTP_METHOD_HEAD 3 |
Head method. | |
HTTP connection types | |
#define | HTTP_CONN_CLOSE 1 |
Connection will be closed. | |
#define | HTTP_CONN_KEEP_ALIVE 2 |
Connection will not be closed. | |
HTTP static texts | |
const char | ct_GET [] |
const char | ct_HEAD [] |
const char | ct_POST [] |
const char | ct_Content_Disposition [] |
const char | ct_Content_Type [] |
const char | ct_Accept_Encoding [] |
const char | ct_Authorization [] |
const char | ct_Connection [] |
const char | ct_close [] |
const char | ct_Keep_Alive [] |
const char | ct_Content_Length [] |
const char | ct_Cookie [] |
const char | ct_Host [] |
const char | ct_Referer [] |
const char | ct_User_Agent [] |
const char | ct_Content_Encoding [] |
const char | ct_Location [] |
const char | ct_If_Modified_Since [] |
const char | ct_Last_Modified [] |
const char | ct_Expires [] |
const char | ct_Date [] |
Micro HTTP library.
File version $Id$