cvs: php4 /ext/zlib zlib.c
| From: | Thies C. Arntzen | Date: | Thu, 01 Feb 2001 17:14:19 +0000 |
| Subject: | cvs: php4 /ext/zlib zlib.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3857@lists.php.net to get a copy of this message | ||
thies Thu Feb 1 09:14:19 2001 EDT
Modified files:
/php4/ext/zlib zlib.c
Log:
@- 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)
Index: php4/ext/zlib/zlib.c
diff -u php4/ext/zlib/zlib.c:1.69 php4/ext/zlib/zlib.c:1.70
--- php4/ext/zlib/zlib.c:1.69 Thu Feb 1 08:29:07 2001
+++ php4/ext/zlib/zlib.c Thu Feb 1 09:14:18 2001
@@ -16,7 +16,7 @@
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.69 2001/02/01 16:29:07 sas Exp $ */
+/* $Id: zlib.c,v 1.70 2001/02/01 17:14:18 thies Exp $ */
#define IS_EXT_MODULE
#include "php.h"
@@ -1115,8 +1115,14 @@
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;