summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/kingate/fastcgi.h15
-rw-r--r--src/fastcgi.cc5
2 files changed, 19 insertions, 1 deletions
diff --git a/include/kingate/fastcgi.h b/include/kingate/fastcgi.h
index fd293b9..6f136b3 100644
--- a/include/kingate/fastcgi.h
+++ b/include/kingate/fastcgi.h
@@ -42,12 +42,27 @@ namespace kingate {
public:
/**
+ * buffer for sbin
+ * @see sbin
+ */
+ char buf_sbin[512];
+ /**
* stdin fcgi streambuf.
*/
fcgi_streambuf sbin;
/**
+ * buffer for sbout
+ * @see sbout
+ */
+ char buf_sbout[512];
+ /**
* stdout fcgi streambuf.
*/
fcgi_streambuf sbout;
/**
+ * buffer for sberr
+ * @see sberr
+ */
+ char buf_sberr[512];
+ /**
* stderr fcgi streambuf.
*/
diff --git a/src/fastcgi.cc b/src/fastcgi.cc
index 6285370..8b7668c 100644
--- a/src/fastcgi.cc
+++ b/src/fastcgi.cc
@@ -38,5 +38,8 @@ namespace kingate {
fcgi_interface::fcgi_interface(fcgi_socket& s,int f)
- : sin(&sbin), sout(&sbout), serr(&sberr) {
+ : sbin(buf_sbin,sizeof(buf_sbin)),
+ sbout(buf_sbout,sizeof(buf_sbout)),
+ sberr(buf_sberr,sizeof(buf_sberr)),
+ sin(&sbin), sout(&sbout), serr(&sberr) {
if( FCGX_InitRequest(&request,s.sock,f) )
throw exception(CODEPOINT,"failed to FCGX_InitRequest()");