author | Michael Krelin <hacker@klever.net> | 2005-06-11 14:49:35 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-06-11 14:49:35 (UTC) |
commit | 621221c40a42683a185b15b99c03fd6c8b6f7d90 (patch) (side-by-side diff) | |
tree | 061f1e7a9fb7b16122eed9715c1a180629dbd953 /lib | |
parent | 01e3789f5b7c3b2c0282b70eb203d11c76d3c8f3 (diff) | |
download | sitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.zip sitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.tar.gz sitecing-621221c40a42683a185b15b99c03fd6c8b6f7d90.tar.bz2 |
1. added missing include
2. fixed typo in Makefile
3. fixed zero-size output segfault
-rw-r--r-- | lib/sitecing_interface_cgi.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sitecing_interface_cgi.cc b/lib/sitecing_interface_cgi.cc index 59ae25a..1acb23c 100644 --- a/lib/sitecing_interface_cgi.cc +++ b/lib/sitecing_interface_cgi.cc @@ -21,7 +21,9 @@ namespace sitecing { flush_headers(); if(is_buffering()) { streampos count = prebuffer.pubseekoff(0,ios_base::cur,ios_base::out); - cgigw->out().write(prebuffer.str().c_str(),count); + if(count>0) { + cgigw->out().write(prebuffer.str().c_str(),count); + } prebuffer.str(""); } cgigw->out().flush(); |