Permalink
Browse files

- 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
  • Loading branch information...
zsuraski committed Nov 13, 2000
1 parent 9b42296 commit 0f7f5c2c0e616445d14b49641e85dbddcc1651e5
Showing with 288 additions and 30 deletions.
  1. +3 −0 NEWS
  2. +15 −5 ext/zlib/php_zlib.h
  3. +227 −15 ext/zlib/zlib.c
  4. +3 −2 main/SAPI.c
  5. +2 −1 main/SAPI.h
  6. +12 −3 main/main.c
  7. +3 −0 main/php_globals.h
  8. +6 −0 php.ini-dist
  9. +6 −0 php.ini-optimized
  10. +6 −0 php.ini-recommended
  11. +1 −1 sapi/apache/sapi_apache.c
  12. +4 −3 sapi/cgi/cgi_main.c
View
3 NEWS
@@ -2,6 +2,9 @@ PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.4
+- Added 'output_handler' INI directive (Zeev)
+- Fixed some buglets in the output buffering mechanism (Zeev)
+- Added transparent gzip compression support (Jade Nicoletti, Zeev)
- Major overhaul of domxml. Added basic XPath support as well (Uwe)
- Added 'r' flag to date() which generates an RFC822 formatted date, e.g.
"Thu, 9 Nov 2000 16:33:01 -0500" (Colin)
View
@@ -22,10 +22,16 @@
#ifndef PHP_ZLIB_H
#define PHP_ZLIB_H
-#if HAVE_ZLIB
+#include <zlib.h>
+
typedef struct {
int gzgetss_state;
+
+ /* variables for transparent gzip encoding */
+ int compression_coding;
+ z_stream stream;
+ uLong crc;
} php_zlib_globals;
extern zend_module_entry php_zlib_module_entry;
@@ -52,21 +58,25 @@ PHP_FUNCTION(gzcompress);
PHP_FUNCTION(gzuncompress);
PHP_FUNCTION(gzdeflate);
PHP_FUNCTION(gzinflate);
+PHP_FUNCTION(gzencode);
+PHP_FUNCTION(ob_gzhandler);
#ifdef ZTS
#define ZLIBLS_D php_zlib_globals *zlib_globals
+#define ZLIBLS_DC , ZLIBLS_D
+#define ZLIBLS_C zlib_globals
+#define ZLIBLS_CC , ZLIBLS_C
#define ZLIBG(v) (zlib_globals->v)
#define ZLIBLS_FETCH() php_zlib_globals *zlib_globals = ts_resource(zlib_globals_id)
#else
#define ZLIBLS_D
+#define ZLIBLS_DC
+#define ZLIBLS_C
+#define ZLIBLS_CC
#define ZLIBG(v) (zlib_globals.v)
#define ZLIBLS_FETCH()
#endif
-#else
-#define zlib_module_ptr NULL
-#endif /* HAVE_ZLIB */
-
#define phpext_zlib_ptr zlib_module_ptr
#endif /* PHP_ZLIB_H */
Oops, something went wrong.

0 comments on commit 0f7f5c2

Please sign in to comment.