From 621221c40a42683a185b15b99c03fd6c8b6f7d90 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sat, 11 Jun 2005 14:49:35 +0000 Subject: 1. added missing include 2. fixed typo in Makefile 3. fixed zero-size output segfault --- 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,6 +1,7 @@ #ifndef __SITECING_ACOMPONENT_H #define __SITECING_ACOMPONENT_H +#include #include "sitecing/sitecing_interface.h" /** 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(); diff --git a/src/Makefile.am b/src/Makefile.am index 2ec650d..e6fb31a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -34,4 +34,4 @@ COPYING.cc: ${top_srcdir}/COPYING 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} -- cgit v0.9.0.2