Nut/OS  5.0.5
API Reference
uhttpd.c File Reference
#include <pro/rfctime.h>
#include <pro/uhttp/utils.h>
#include <pro/uhttp/uhttpd.h>
#include <pro/uhttp/mediatypes.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#include <fcntl.h>
Include dependency graph for uhttpd.c:

Defines

#define HTTP_MAX_REQUEST_SIZE   64

Functions

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.
int HttpParseMultipartHeader (HTTPD_SESSION *hs, const char *bnd, long *avail)
 Parse HTTP multipart header.
int HttpParseHeader (HTTPD_SESSION *hs)
 Parse HTTP header.
int HttpRegisterRootPath (char *path)
 Register the HTTP server's root directory.
void HttpdClientHandler (HTTP_STREAM *sp)
 Default client handler.

Variables

const char ct_GET [] = "GET"
const char ct_HEAD [] = "HEAD"
const char ct_POST [] = "POST"
const char ct_Content_Disposition [] = "Content-Disposition"
const char ct_Content_Type [] = "Content-Type"
const char ct_Accept_Encoding [] = "Accept-Encoding"
const char ct_Authorization [] = "Authorization"
const char ct_Connection [] = "Connection"
const char ct_close [] = "close"
const char ct_Keep_Alive [] = "keep-alive"
const char ct_Content_Length [] = "Content-Length"
const char ct_Cookie [] = "Cookie"
const char ct_Host [] = "Host"
const char ct_If_Modified_Since [] = "If-Modified-Since"
const char ct_Referer [] = "Referer"
const char ct_User_Agent [] = "User-Agent"
const char ct_Last_Modified [] = "Last-Modified"
const char ct_Expires [] = "Expires"
const char ct_Date [] = "Date"
const char ct_Content_Encoding [] = "Content-Encoding"
const char ct_Location [] = "Location"
char * http_root
HTTP_AUTH_VALIDATOR httpd_auth_validator = HttpAuthValidateAll
 HTTP authentication function pointer.
HTTP_LOC_REDIRECTOR httpd_loc_redirector = HttpLocationRedirNone
 HTTP redirection function pointer.

Define Documentation

#define HTTP_MAX_REQUEST_SIZE   64