From b14a0c3c3bc9cbad4c0f1b52a396ebb38e2d78f8 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 18 Jan 2015 15:32:13 +0100 Subject: [PATCH] - put proper pointer into the free function - abort if the algorythm says more to come but doesn't send anymore. --- webcit/tcp_sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webcit/tcp_sockets.c b/webcit/tcp_sockets.c index d4795c830..33889f665 100644 --- a/webcit/tcp_sockets.c +++ b/webcit/tcp_sockets.c @@ -697,7 +697,7 @@ void serv_read_binary_to_http(StrBuf *MimeType, size_t total_len, int is_static, } FlushStrBuf(pBuf); } - } while (rc == 1); + } while ((rc == 1) && (StrLength(pBuf) > 0)); } FlushStrBuf(WCC->WBuf); } @@ -718,7 +718,7 @@ void serv_read_binary_to_http(StrBuf *MimeType, size_t total_len, int is_static, } } - StrBufDestroyStreamContext(eZLibEncode, SC); + StrBufDestroyStreamContext(eZLibEncode, &SC); FreeStrBuf(&WriteBuffer.Buf); if ((chunked) && (client_con_state == 0)) { -- 2.30.2