aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cgiutil.cpp10
-rw-r--r--src/cgiutil.h16
-rw-r--r--src/fastcgi.cpp2
-rw-r--r--src/fastcgi.h6
-rw-r--r--src/tests/fastcgi.cpp4
5 files changed, 32 insertions, 6 deletions
diff --git a/src/cgiutil.cpp b/src/cgiutil.cpp
new file mode 100644
index 0000000..1f7a8d0
--- /dev/null
+++ b/src/cgiutil.cpp
@@ -0,0 +1,10 @@
1#include "bu/cgiutil.h"
2
3Bu::CgiUtil::CgiUtil()
4{
5}
6
7Bu::CgiUtil::~CgiUtil()
8{
9}
10
diff --git a/src/cgiutil.h b/src/cgiutil.h
new file mode 100644
index 0000000..4a9ae2d
--- /dev/null
+++ b/src/cgiutil.h
@@ -0,0 +1,16 @@
1#ifndef CGI_UTIL_H
2#define CGI_UTIL_H
3
4namespace Bu
5{
6 class CgiUtil
7 {
8 public:
9 CgiUtil();
10 virtual ~CgiUtil();
11
12 private:
13 };
14};
15
16#endif
diff --git a/src/fastcgi.cpp b/src/fastcgi.cpp
index 9a602de..58d886d 100644
--- a/src/fastcgi.cpp
+++ b/src/fastcgi.cpp
@@ -282,7 +282,7 @@ void Bu::FastCgi::run()
282 { 282 {
283 sio << "All done, generating output." << sio.nl; 283 sio << "All done, generating output." << sio.nl;
284 Bu::MemBuf mStdOut, mStdErr; 284 Bu::MemBuf mStdOut, mStdErr;
285 int iRet = request( 285 int iRet = onRequest(
286 pChan->hParams, pChan->sStdIn, 286 pChan->hParams, pChan->sStdIn,
287 mStdOut, mStdErr 287 mStdOut, mStdErr
288 ); 288 );
diff --git a/src/fastcgi.h b/src/fastcgi.h
index 67ec82f..4efa992 100644
--- a/src/fastcgi.h
+++ b/src/fastcgi.h
@@ -95,11 +95,11 @@ namespace Bu
95 95
96 virtual void run(); 96 virtual void run();
97 97
98 virtual void init() { }; 98 virtual void onInit() { };
99 virtual int request( const StrHash &hParams, 99 virtual int onRequest( const StrHash &hParams,
100 const Bu::FString &sStdIn, Bu::Stream &sStdOut, 100 const Bu::FString &sStdIn, Bu::Stream &sStdOut,
101 Bu::Stream &sStdErr )=0; 101 Bu::Stream &sStdErr )=0;
102 virtual void deinit() { }; 102 virtual void onUninit() { };
103 103
104 private: 104 private:
105 void read( Bu::Socket &s, Record &r ); 105 void read( Bu::Socket &s, Record &r );
diff --git a/src/tests/fastcgi.cpp b/src/tests/fastcgi.cpp
index 53dd68a..e71b3c5 100644
--- a/src/tests/fastcgi.cpp
+++ b/src/tests/fastcgi.cpp
@@ -17,9 +17,9 @@ public:
17 { 17 {
18 } 18 }
19 19
20 virtual int request( const StrHash &hParams, 20 virtual int onRequest( const StrHash &hParams,
21 const Bu::FString &sStdIn, Bu::Stream &sStdOut, 21 const Bu::FString &sStdIn, Bu::Stream &sStdOut,
22 Bu::Stream &sStdErr ) 22 Bu::Stream &/*sStdErr*/ )
23 { 23 {
24 Bu::FString sOut("Content-Type: text/html\r\n\r\n"); 24 Bu::FString sOut("Content-Type: text/html\r\n\r\n");
25 sOut += "<html><body><h1>Environment:</h1><ul>"; 25 sOut += "<html><body><h1>Environment:</h1><ul>";