Add dynamically loaded cgi support

git-svn-id: file:///home/jj/hercules.svn/trunk@1522 956126f8-22a0-4046-8f4a-272fa8102e63
This commit is contained in:
Jan Jaeger
2003-06-27 17:03:52 +00:00
parent 3b19898122
commit fcd438b7e3
4 changed files with 119 additions and 0 deletions

View File

@@ -537,6 +537,22 @@ static void *http_request(FILE *hsock)
}
}
#if defined(OPTION_DYNAMIC_LOAD)
{
zz_cgibin dyncgi;
if( (dyncgi = HDL_FINDSYM(webblk->baseurl)) )
{
char tbuf[80];
fprintf(webblk->hsock,"HTTP/1.0 200 OK\nConnection: close\n");
fprintf(webblk->hsock,"Date: %s\n",
http_timestring(tbuf,sizeof(tbuf),time(NULL)));
dyncgi(webblk);
http_exit(webblk);
}
}
#endif /*defined(OPTION_DYNAMIC_LOAD)*/
http_error(webblk, "404 File Not Found","",
"The requested file was not found");