From 1366f67d0b1bbe52796aa5f7080a0e5cde90e688 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Thu, 1 Feb 2001 17:14:18 +0000 Subject: [PATCH] @- When using the ob_gzhandler() PHP now automagically also sets the @ Content-Lengh correctly which enables browsers to use the HTTP @ Keep-Alive feature. (Thies) --- ext/zlib/zlib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ed8299e6d0..59b370d18b 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1115,8 +1115,14 @@ PHP_FUNCTION(ob_gzhandler) return_original = 1; break; } + if (return_original) { zval_dtor(return_value); + } else { + char lenbuf[ 64 ]; + + sprintf(lenbuf,"Content-Length: %d",Z_STRLEN_P(return_value)); + sapi_add_header(lenbuf,strlen(lenbuf), 1); } } else { return_original = 1; -- 2.50.1