summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/acomponent.h1
-rw-r--r--lib/sitecing_interface_cgi.cc4
-rw-r--r--src/Makefile.am2
3 files changed, 5 insertions, 2 deletions
diff --git a/include/sitecing/acomponent.h b/include/sitecing/acomponent.h
index 160e854..461f8a6 100644
--- a/include/sitecing/acomponent.h
+++ b/include/sitecing/acomponent.h
@@ -1,11 +1,12 @@
#ifndef __SITECING_ACOMPONENT_H
#define __SITECING_ACOMPONENT_H
+#include <cstdarg>
#include "sitecing/sitecing_interface.h"
/**
* @file
* @brief The acomponent class declaration.
*/
namespace sitecing {
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
@@ -16,17 +16,19 @@ namespace sitecing {
set_buffering(true);
}
void sitecing_interface_cgi::flush(bool keep_buffering) {
assert(cgigw);
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();
set_buffering(keep_buffering);
}
void sitecing_interface_cgi::set_buffering(bool do_buffer) {
if(!do_buffer)
diff --git a/src/Makefile.am b/src/Makefile.am
index 2ec650d..e6fb31a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,9 +29,9 @@ sitecing_build_SOURCES = sitecing-build.cc \
sitecing_build_LDADD = ${KINGATE_LIBS}
sitecing_build_DEPENDENCIES = ${top_builddir}/lib/libsitecing.la
COPYING.cc: ${top_srcdir}/COPYING
echo "const char * COPYING =" >$@ || (rm $@;exit 1)
sed 's/"/\\"/g' $< | sed 's/^/\"/' | sed 's/$$/\\n\"/' >>$@ || (rm $@;exit 1)
echo ";" >>$@ || (rm $@;exit 1)
-EXTRA_DIST = ${sitecing_fastcgi_SOURCES} ${sitecing_PLAINCGI_SOURCES}
+EXTRA_DIST = ${sitecing_fastcgi_SOURCES} ${sitecing_plaincgi_SOURCES}