diff options
author | Patrick <Patrick.Murphy@multitech.com> | 2020-04-01 13:26:27 -0500 |
---|---|---|
committer | Patrick <Patrick.Murphy@multitech.com> | 2020-04-01 13:26:27 -0500 |
commit | a1558341bcbfbcb878726f5bd4b4dd6eda14d551 (patch) | |
tree | 0625cd8ded946d6fe675256d3056a1a685068428 /src/fcgi_commission.cpp | |
parent | 78178d911f0ede1776390b360af2ee0235e4fa53 (diff) | |
download | commissioning-a1558341bcbfbcb878726f5bd4b4dd6eda14d551.tar.gz commissioning-a1558341bcbfbcb878726f5bd4b4dd6eda14d551.tar.bz2 commissioning-a1558341bcbfbcb878726f5bd4b4dd6eda14d551.zip |
modified makefile format
Diffstat (limited to 'src/fcgi_commission.cpp')
-rw-r--r-- | src/fcgi_commission.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/fcgi_commission.cpp b/src/fcgi_commission.cpp deleted file mode 100644 index bd082ff..0000000 --- a/src/fcgi_commission.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "fcgio.h" -#include <iostream> - -int main(void) { - // Backup the stdio streambufs - streambuf * cin_streambuf = cin.rdbuf(); - streambuf * cout_streambuf = cout.rdbuf(); - streambuf * cerr_streambuf = cerr.rdbuf(); - - FCGX_Request request; - - FCGX_Init(); - FCGX_InitRequest(&request, 0, 0); - - while (FCGX_Accept_r(&request) == 0) { - fcgi_streambuf cin_fcgi_streambuf(request.in); - fcgi_streambuf cout_fcgi_streambuf(request.out); - fcgi_streambuf cerr_fcgi_streambuf(request.err); - - cin.rdbuf(&cin_fcgi_streambuf); - cout.rdbuf(&cout_fcgi_streambuf); - cerr.rdbuf(&cerr_fcgi_streambuf); - - cout << "Content-type: text/html\r\n" - << "\r\n" - << "<html>\n" - << " <head>\n" - << " <title>Hello, World!</title>\n" - << " </head>\n" - << " <body>\n" - << " <h1>Hello, World!</h1>\n" - << " </body>\n" - << "</html>\n"; - - // Note: the fcgi_streambuf destructor will auto flush - } - - // restore stdio streambufs - cin.rdbuf(cin_streambuf); - cout.rdbuf(cout_streambuf); - cerr.rdbuf(cerr_streambuf); - - return 0; -}
\ No newline at end of file |