diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-06-22 22:49:23 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-06-22 22:49:23 +0100 |
commit | ec5aef094cbcb9769c50a7e7a6a344036e01f67b (patch) | |
tree | 78e6986b60b076c781c1876eb5455226e9582f4f /icespider/fcgi/main.cpp | |
parent | Determine return type based on second arg to all chaining (diff) | |
download | icespider-ec5aef094cbcb9769c50a7e7a6a344036e01f67b.tar.bz2 icespider-ec5aef094cbcb9769c50a7e7a6a344036e01f67b.tar.xz icespider-ec5aef094cbcb9769c50a7e7a6a344036e01f67b.zip |
Very basic, probably buggy, incomplete [f]cgi implementation
Diffstat (limited to 'icespider/fcgi/main.cpp')
-rw-r--r-- | icespider/fcgi/main.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/icespider/fcgi/main.cpp b/icespider/fcgi/main.cpp index 6132769..1d2e68c 100644 --- a/icespider/fcgi/main.cpp +++ b/icespider/fcgi/main.cpp @@ -1,8 +1,14 @@ -#include <fcgio.h> +#include <visibility.h> +#include "fcgiRequest.h" +#include "cgiRequest.h" +using namespace IceSpider; + +DLL_PUBLIC int -main(void) +main(int argc, char ** argv, char ** env) { + IceSpider::Core core; if (!FCGX_IsCGI()) { FCGX_Request request; @@ -10,13 +16,15 @@ main(void) FCGX_InitRequest(&request, 0, 0); while (FCGX_Accept_r(&request) == 0) { - // app.process(IO, &IO, IO); + FcgiRequest r(&core, &request); + core.process(&r); FCGX_Finish_r(&request); } - return 0; } else { - return 1; + CgiRequest r(&core, argc, argv, env); + core.process(&r); } + return 0; } |