cvs: php4(PHP_4_3) /ext/zlib zlib.c

From: Date: Wed, 21 May 2003 17:00:57 +0000
Subject: cvs: php4(PHP_4_3) /ext/zlib zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21182@lists.php.net to get a copy of this message
rasmus Wed May 21 13:00:57 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/zlib zlib.c Log: Revert bogus commit Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.153.2.9 php4/ext/zlib/zlib.c:1.153.2.10 --- php4/ext/zlib/zlib.c:1.153.2.9 Wed May 21 12:07:33 2003 +++ php4/ext/zlib/zlib.c Wed May 21 13:00:57 2003 @@ -18,7 +18,7 @@ | Jade Nicoletti <nicoletti@nns.ch> | +----------------------------------------------------------------------+ */ -/* $Id: zlib.c,v 1.153.2.9 2003/05/21 16:07:33 sander Exp $ */ +/* $Id: zlib.c,v 1.153.2.10 2003/05/21 17:00:57 rasmus Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -47,7 +47,6 @@ #include "safe_mode.h" #include "ext/standard/php_standard.h" #include "ext/standard/info.h" -#include "ext/standard/php_smart_str.h" #include "php_zlib.h" #include "fopen_wrappers.h" #if HAVE_PWD_H @@ -78,22 +77,6 @@ #define GZIP_HEADER_LENGTH 10 #define GZIP_FOOTER_LENGTH 8 -#define ADD_CL_HEADER(xln) \ -{ \ - smart_str str = {0}; \ - sapi_header_line ctr = {0}; \ - \ - smart_str_appends(&str, "Content-Length: "); \ - smart_str_append_long(&str, xln); \ - smart_str_0(&str); \ - \ - ctr.line = str.c; \ - ctr.line_len = str.len; \ - \ - sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC); \ - smart_str_free(&str); \ -} - /* True globals, no need for thread safety */ static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ @@ -1017,8 +1000,6 @@ if (return_original) { zval_dtor(return_value); - } else if(do_start && do_end) { - ADD_CL_HEADER(Z_STRLEN_P(return_value)); } } else { @@ -1046,8 +1027,6 @@ do_end = (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0); if (php_deflate_string(output, output_len, handled_output, handled_output_len, ZLIBG(ob_gzip_coding), do_start, do_end, ZLIBG(output_compression_level) TSRMLS_CC)!=SUCCESS) { zend_error(E_ERROR, "Compression failed"); - } else if (do_start && do_end) { - ADD_CL_HEADER(*handled_output_len); } } }

« previous php.cvs (#21182) next »