From e9da242ed4654d99a909993e6919c37f7fbca9f3 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Thu, 16 Aug 2001 23:34:25 +0000 Subject: [PATCH] Send Content-Length if we're sending just one chunk --- ext/zlib/CREDITS | 2 +- ext/zlib/zlib.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/zlib/CREDITS b/ext/zlib/CREDITS index 4972838339..c0a47dd293 100644 --- a/ext/zlib/CREDITS +++ b/ext/zlib/CREDITS @@ -1,2 +1,2 @@ Zlib -Rasmus Lerdorf, Stefan Roehrich +Rasmus Lerdorf, Stefan Roehrich, Zeev Suraski, Jade Nicoletti diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 72a4680fe8..b331bad23a 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -14,6 +14,8 @@ +----------------------------------------------------------------------+ | Authors: Rasmus Lerdorf | | Stefan Röhrich | + | Zeev Suraski | + | Jade Nicoletti | +----------------------------------------------------------------------+ */ /* $Id$ */ @@ -1200,13 +1202,11 @@ PHP_FUNCTION(ob_gzhandler) if (return_original) { zval_dtor(return_value); -#if 0 - } else { + } else if (do_start && do_end) { char lenbuf[64]; sprintf(lenbuf,"Content-Length: %d",Z_STRLEN_P(return_value)); sapi_add_header(lenbuf,strlen(lenbuf), 1); -#endif } } else { return_original = 1; -- 2.50.1