Skip to content

Commit 0f7f5c2

Browse files
committed
- Import Jade Nicoletti's transparent gzip encoding support as an output
handler. Works quite nicely! - Fix buglets in output buffering - Add output_handler INI directive
1 parent 9b42296 commit 0f7f5c2

12 files changed

Lines changed: 288 additions & 30 deletions

File tree

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP 4.0 NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33

44
?? ??? 2000, Version 4.0.4
5+
- Added 'output_handler' INI directive (Zeev)
6+
- Fixed some buglets in the output buffering mechanism (Zeev)
7+
- Added transparent gzip compression support (Jade Nicoletti, Zeev)
58
- Major overhaul of domxml. Added basic XPath support as well (Uwe)
69
- Added 'r' flag to date() which generates an RFC822 formatted date, e.g.
710
"Thu, 9 Nov 2000 16:33:01 -0500" (Colin)

ext/zlib/php_zlib.h

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@
2222
#ifndef PHP_ZLIB_H
2323
#define PHP_ZLIB_H
2424

25-
#if HAVE_ZLIB
25+
#include <zlib.h>
26+
2627

2728
typedef struct {
2829
int gzgetss_state;
30+
31+
/* variables for transparent gzip encoding */
32+
int compression_coding;
33+
z_stream stream;
34+
uLong crc;
2935
} php_zlib_globals;
3036

3137
extern zend_module_entry php_zlib_module_entry;
@@ -52,21 +58,25 @@ PHP_FUNCTION(gzcompress);
5258
PHP_FUNCTION(gzuncompress);
5359
PHP_FUNCTION(gzdeflate);
5460
PHP_FUNCTION(gzinflate);
61+
PHP_FUNCTION(gzencode);
62+
PHP_FUNCTION(ob_gzhandler);
5563

5664
#ifdef ZTS
5765
#define ZLIBLS_D php_zlib_globals *zlib_globals
66+
#define ZLIBLS_DC , ZLIBLS_D
67+
#define ZLIBLS_C zlib_globals
68+
#define ZLIBLS_CC , ZLIBLS_C
5869
#define ZLIBG(v) (zlib_globals->v)
5970
#define ZLIBLS_FETCH() php_zlib_globals *zlib_globals = ts_resource(zlib_globals_id)
6071
#else
6172
#define ZLIBLS_D
73+
#define ZLIBLS_DC
74+
#define ZLIBLS_C
75+
#define ZLIBLS_CC
6276
#define ZLIBG(v) (zlib_globals.v)
6377
#define ZLIBLS_FETCH()
6478
#endif
6579

66-
#else
67-
#define zlib_module_ptr NULL
68-
#endif /* HAVE_ZLIB */
69-
7080
#define phpext_zlib_ptr zlib_module_ptr
7181

7282
#endif /* PHP_ZLIB_H */

0 commit comments

Comments
 (0)