diff --git a/CMakeLists.txt b/CMakeLists.txt index 303230e..076de21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ MACRO(ADD_TARGET_PROPERTIES _target _name _properties) ENDMACRO(ADD_TARGET_PROPERTIES) PROJECT(fcgi-cgi C) -SET(PACKAGE_VERSION 0.2.0) +SET(PACKAGE_VERSION 0.2.1) IF("${CMAKE_BUILD_TYPE}" STREQUAL "") SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") diff --git a/configure.ac b/configure.ac index 41073c2..17595a0 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT([fcgi-cgi], [0.2.0], [lighttpd@stbuehler.de]) +AC_INIT([fcgi-cgi], [0.2.1], [lighttpd@stbuehler.de]) AC_CONFIG_SRCDIR([fcgi-cgi.c]) AC_CONFIG_HEADERS([config.h]) diff --git a/fastcgi.c b/fastcgi.c index 4220ed2..4091909 100644 --- a/fastcgi.c +++ b/fastcgi.c @@ -801,6 +801,7 @@ void fastcgi_end_request(fastcgi_connection *fcon, gint32 appStatus, enum FCGI_P if (0 == fcon->requestID) return; stream_send_end_request(&fcon->write_queue, fcon->requestID, appStatus, status); fcon->requestID = 0; + fastcgi_connection_environ_clear(fcon); if (!had_data) write_queue(fcon); } diff --git a/fcgi-cgi.c b/fcgi-cgi.c index 31fd27c..b00188b 100644 --- a/fcgi-cgi.c +++ b/fcgi-cgi.c @@ -460,7 +460,11 @@ static void fcgi_cgi_received_stdin(fastcgi_connection *fcon, GByteArray *data) if (data) g_byte_array_free(data, TRUE); return; } - fastcgi_queue_append_bytearray(&cld->write_queue, data); + if (NULL != data) { + fastcgi_queue_append_bytearray(&cld->write_queue, data); + } else { + cld->write_queue.closed = TRUE; + } write_queue(cld); /* if we don't call this we have to check the write-queue length */ }