mirror of
https://github.com/SDL-Hercules-390/hyperion.git
synced 2026-04-17 01:15:26 +02:00
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:
16
httpserv.c
16
httpserv.c
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user