CVS update: php31/sapi

From: Date: Sun, 08 Nov 1998 02:43:39 +0000
Subject: CVS update: php31/sapi
Groups: php.dev 
Request: Send a blank email to php-dev+get-2281@lists.php.net to get a copy of this message
Date: Saturday November 7, 1998 @ 21:43 Author: cschneid Update of /repository/php31/sapi In directory asf:/u2/tmp/cvs-serv18111/sapi Modified Files: sapi.h Log Message: Added on the fly output compression. It requires zlib support and includes configure option --disable-output-compression and php31.ini option compress_output=yes|no Output is sent compressed with Content-encoding: gzip if browser sent Accept-encoding: *gzip* before. All code related to output compression is enclosed in #if PHP3_COMPRESS_OUTPUT set by configure. Index: php31/sapi/sapi.h diff -c php31/sapi/sapi.h:2.17 php31/sapi/sapi.h:2.18 *** php31/sapi/sapi.h:2.17 Tue Sep 22 15:19:53 1998 --- php31/sapi/sapi.h Sat Nov 7 21:43:38 1998 *************** *** 16,21 **** --- 16,37 ---- #include "php3_ini.h" #include "string_buffer.h" + #if PHP3_COMPRESS_OUTPUT + #include <zlib.h> + + #define ZOUTBUF_SIZE 1024*8 + + /* Copied definitions from zutil.h */ + #ifndef OS_CODE + #define OS_CODE 0x03 /* assume Unix */ + #endif + #if MAX_MEM_LEVEL >= 8 + #define DEF_MEM_LEVEL 8 + #else + #define DEF_MEM_LEVEL MAX_MEM_LEVEL + #endif + #endif + #ifdef THREAD_SAFE #if DEBUG #define SAPI_GLOBAL_INCLUDE char *cfilename, uint clineno, void *php3_globals_var, *************** *** 81,86 **** --- 97,110 ---- unsigned char buffered_output; StringBuffer output_buffer; + + #if PHP3_COMPRESS_OUTPUT + int (*savedwriteclient) (SAPI_GLOBAL_INCLUDE unsigned char *, int); + int (*savedflush) (SAPI_GLOBAL_INCLUDE_V); /*flush writes to client */ + z_stream zstream; /* zlib stream for Content-encoding: gzip */ + Bytef *zoutbuf; /* output buffer for zstream */ + uLong zcrc; /* output CRC checksum for gzip file */ + #endif /* signal and thread functions */ void (*blockalarms) (SAPI_GLOBAL_INCLUDE_V); /*signal blocking */ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2281) next »