File nut/pro/httpd.c


Included Files


Local Variables

mimeTypes
static struct {...} mimeTypes[]
Used in: NutGetMimeHandler()  
  NutGetMimeType()  
  NutSetMimeHandler()  

http_root
static char* http_root

Used in: NutRegisterHttpRoot()  

hexdigits
static char* hexdigits

Used in: NutHttpURLEncode()  

Global Function NutGetMimeHandler()

void* NutGetMimeHandler ( char* name )
Prototyped in: nut/include/pro/httpd.h
Calls: strcasecmp(), strlen()
Called by: NutHttpProcessFileRequest() nut/pro/httpd.c
References Variables: mimeTypes nut/pro/httpd.c

Global Function NutGetMimeType()

char* NutGetMimeType ( char* name )
Prototyped in: nut/include/pro/httpd.h
Calls: strcasecmp(), strlen()
Called by: NutHttpProcessFileRequest() nut/pro/httpd.c
References Variables: mimeTypes nut/pro/httpd.c

Global Function NutHttpGetParameter()

char* NutHttpGetParameter ( REQUEST* req, char* name )
Prototyped in: nut/include/pro/httpd.h
Calls: strcmp()

Global Function NutHttpGetParameterCount()

int NutHttpGetParameterCount ( REQUEST* req )
Prototyped in: nut/include/pro/httpd.h
Called by: NutHttpGetParameterName() nut/pro/httpd.c
  NutHttpGetParameterValue() nut/pro/httpd.c

Global Function NutHttpGetParameterName()

char* NutHttpGetParameterName ( REQUEST* req, int index )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHttpGetParameterCount() nut/pro/httpd.c

Global Function NutHttpGetParameterValue()

char* NutHttpGetParameterValue ( REQUEST* req, int index )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHttpGetParameterCount() nut/pro/httpd.c

Global Function NutHttpProcessPostQuery()

void NutHttpProcessPostQuery ( FILE* stream, REQUEST* req )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapAllocClear() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  NutHttpURLDecode() nut/pro/httpd.c
  fread()

Global Function NutHttpProcessQueryString()

void NutHttpProcessQueryString ( REQUEST* req )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHeapAlloc() nut/os/heap.c
  NutHttpURLDecode() nut/pro/httpd.c
Called by: NutHttpProcessRequest() nut/pro/httpd.c

Global Function NutHttpProcessRequest()

void NutHttpProcessRequest ( FILE* stream )
Prototyped in: nut/include/pro/httpd.h
Calls: CreateRequestInfo() nut/pro/httpd.c
  DestroyRequestInfo() nut/pro/httpd.c
  NextWord() nut/pro/httpd.c
  NutDecodePath() nut/pro/dencode.c
  NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  NutHttpProcessFileRequest() nut/pro/httpd.c
  NutHttpProcessQueryString() nut/pro/httpd.c
  NutHttpSendError() nut/pro/httpd.c
  atoi(), fgets(), strcasecmp(), strchr(), strcpy(), strlen(), strncasecmp()

Global Function NutHttpSendError()

void NutHttpSendError ( FILE* stream, REQUEST* req, int status )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHttpSendHeaderBot() nut/pro/httpd.c
  NutHttpSendHeaderTop() nut/pro/httpd.c
  fprintf_P(), strrchr()
Called by: NutCgiProcessRequest() nut/pro/cgi.c
  NutHttpProcessFileRequest() nut/pro/httpd.c
  NutHttpProcessRequest() nut/pro/httpd.c

Global Function NutHttpSendHeaderBot()

void NutHttpSendHeaderBot ( FILE* stream, char* mime_type, long bytes )
Prototyped in: nut/include/pro/httpd.h
Calls: fprintf_P(), fputs_P()
Called by: NutHttpProcessFileRequest() nut/pro/httpd.c
  NutHttpSendError() nut/pro/httpd.c

Global Function NutHttpSendHeaderTop()

void NutHttpSendHeaderTop ( FILE* stream, REQUEST* req, int status, char* title )
Prototyped in: nut/include/pro/httpd.h
Calls: NutVersionString() nut/os/version.c
  fprintf_P()
Called by: NutHttpProcessFileRequest() nut/pro/httpd.c
  NutHttpSendError() nut/pro/httpd.c

Global Function NutHttpURLDecode()

void NutHttpURLDecode ( char* str )
Prototyped in: nut/include/pro/httpd.h
Calls: strtol()
Called by: NutHttpProcessPostQuery() nut/pro/httpd.c
  NutHttpProcessQueryString() nut/pro/httpd.c

Global Function NutHttpURLEncode()

char* NutHttpURLEncode ( char* str )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHeapAlloc() nut/os/heap.c
  isalnum(), strlen()
References Variables: hexdigits nut/pro/httpd.c

Global Function NutRegisterHttpRoot()

int NutRegisterHttpRoot ( char* path )
Prototyped in: nut/include/pro/httpd.h
Calls: NutHeapAlloc() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  strcpy(), strlen()
References Variables: http_root nut/pro/httpd.c

Global Function NutSetMimeHandler()

u_char NutSetMimeHandler ( char* extension, void (*handler)(FILE* stream,int fd,int file_len,char* http_root,REQUEST* req) )
Prototyped in: nut/include/pro/httpd.h
Calls: strcasecmp()
Called by: NutRegisterAsp() nut/pro/asp.c
References Variables: mimeTypes nut/pro/httpd.c

Local Function CreateRequestInfo()

static REQUEST* CreateRequestInfo ( void )
Calls: NutHeapAllocClear() nut/os/heap.c
Called by: NutHttpProcessRequest() nut/pro/httpd.c

Local Function DestroyRequestInfo()

static void DestroyRequestInfo ( REQUEST* req )
Calls: NutHeapFree() nut/os/heap.c
Called by: NutHttpProcessRequest() nut/pro/httpd.c

Local Function NextWord()

static char* NextWord ( char* str )
Called by: NutHttpProcessRequest() nut/pro/httpd.c

Local Function NutHttpProcessFileRequest()

static void NutHttpProcessFileRequest ( FILE* stream, REQUEST* req )
Calls: NutCgiProcessRequest() nut/pro/cgi.c
  NutGetMimeHandler() nut/pro/httpd.c
  NutGetMimeType() nut/pro/httpd.c
  NutHeapAlloc() nut/os/heap.c
  NutHeapAllocClear() nut/os/heap.c
  NutHeapFree() nut/os/heap.c
  NutHttpAuthValidate() nut/pro/auth.c
  NutHttpSendError() nut/pro/httpd.c
  NutHttpSendHeaderBot() nut/pro/httpd.c
  NutHttpSendHeaderTop() nut/pro/httpd.c
  _close(), _filelength(), _open(), _read(), fwrite(), strcat(), strcpy(), strlen(), strncasecmp()
Called by: NutHttpProcessRequest() nut/pro/httpd.c