author | Michael Krelin <hacker@klever.net> | 2005-07-04 18:08:49 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-07-04 18:08:49 (UTC) |
commit | c8bcbfb951eec5fe14dac0b14f4faaf4a9f9f229 (patch) (unidiff) | |
tree | 60d24c0465cd57c839fa46de97cc35e59cc5b535 /src | |
parent | 43d47575878e4eaf3c8da84bf609fcd0bde595fb (diff) | |
download | kingate-c8bcbfb951eec5fe14dac0b14f4faaf4a9f9f229.zip kingate-c8bcbfb951eec5fe14dac0b14f4faaf4a9f9f229.tar.gz kingate-c8bcbfb951eec5fe14dac0b14f4faaf4a9f9f229.tar.bz2 |
added buffers to fastcgi streambufs. It gains compatibility with normal streambuf manipulations at the cost of performance (according to comments in fcgi devkit). The performance lost should not be disastrous, though.
-rw-r--r-- | src/fastcgi.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fastcgi.cc b/src/fastcgi.cc index 6285370..8b7668c 100644 --- a/src/fastcgi.cc +++ b/src/fastcgi.cc | |||
@@ -36,9 +36,12 @@ namespace kingate { | |||
36 | close(sock); | 36 | close(sock); |
37 | } | 37 | } |
38 | 38 | ||
39 | fcgi_interface::fcgi_interface(fcgi_socket& s,int f) | 39 | fcgi_interface::fcgi_interface(fcgi_socket& s,int f) |
40 | : sin(&sbin), sout(&sbout), serr(&sberr) { | 40 | : sbin(buf_sbin,sizeof(buf_sbin)), |
41 | sbout(buf_sbout,sizeof(buf_sbout)), | ||
42 | sberr(buf_sberr,sizeof(buf_sberr)), | ||
43 | sin(&sbin), sout(&sbout), serr(&sberr) { | ||
41 | if( FCGX_InitRequest(&request,s.sock,f) ) | 44 | if( FCGX_InitRequest(&request,s.sock,f) ) |
42 | throw exception(CODEPOINT,"failed to FCGX_InitRequest()"); | 45 | throw exception(CODEPOINT,"failed to FCGX_InitRequest()"); |
43 | if( FCGX_Accept_r(&request) ) | 46 | if( FCGX_Accept_r(&request) ) |
44 | throw exception(CODEPOINT,"failed to FCGX_Accept_r()"); | 47 | throw exception(CODEPOINT,"failed to FCGX_Accept_r()"); |