Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
httpValidations.c File Reference
#include <stddef.h>
#include <http.h>
#include <string.h>

Functions

int validMethod (char *method, int mlen)
 
int validVersion (char *version, int vlen)
 
int validURI (char *url, int ulen)
 

Function Documentation

int validMethod ( char *  method,
int  mlen 
)

Determines if the passed HTTP method is allowed.

Parameters
methodstring associated with the HTTP method to check
mlenlength of method string to check
Returns
method constant if valid method, otherwise SYSERR
int validURI ( char *  url,
int  ulen 
)

Determines if the passed URI is a valid request.

Parameters
urlstring associated with the url to check
ulenlength of the url string to check
Returns
index into httpcmdtab of page to process, otherwise SYSERR
int validVersion ( char *  version,
int  vlen 
)

Determines if the passed HTTP version is allowed.

Parameters
versionstring associated with the HTTP version to check
vlenlength of the version string to check
Returns
version constant if valid method, otherwise SYSERR