
From: Kevin Kiley <Kiley@remotecommunications.com>
To: mod_gzip@lists.over.net <mod_gzip@lists.over.net>
Subject: [Mod_gzip] ANNOUNCE: mod_gzip version 1.3.14.6e is now available
Date: Monday, December 04, 2000 3:08 AM

Hello all...
Kevin Kiley here...
CTO for Remote Communications, Inc.
 
* mod_gzip version 1.3.14.6e dated 12/04/00 is now available.
 
Version 1.3.14.6e now fully supports the dynamic compression of PHP
output when used as CGI OR with 'mod_php'. All other forms of CGI
output ( both external CGI and mod_xxxxx Apache module output )
being compressed as well and that includes Perl scripts, Shell
scripts, whatever. Zope and compiled 'C' are still OK as well.
 
* SSI ( Server Side Includes ) now supported as well

SSI dynamic output should now be fully compressed as well.
Needs more testing but seems to work AOK as of release day.

There are LOTS of other fixes/additions. See the WHATSNEW.TXT
file inside of this message or on the mod_gzip HOME page.

* WHERE DO I GET IT...
 
Right here at the top of the mod_gzip home page...
http://www.remotecommunications.com/apache/mod_gzip/
 
It's also available on the same page under the Downloads section.
 
You could also go directly to 12.17.228.52 and get it, if that
Server is available. It may be down for a few hours from time to time.

http://12.17.228.52/mod_gzip/src/1.3.14.6e/
 
What you will find there is the following...
 
 ApacheModuleGzip.dll        61k  - Win32 pre-compiled mod
 mod_gzip.c                 377k  - Source code for 1.3.14.6e
 mod_gzip.txt               377k  - Same as mod_gzip.c with .txt instead
 mod_gzip.c.gz               78k  - Source code GZIPPED
 mod_gzip.so                109k  - Pre-compiled Linux DSO mod
 readme.txt                  18k  - Install, setup, sample configs.
 whatsnew.txt                11k  - New version information for 1.3.14.6e
 
The 'readme.txt' file and this ANNOUNCEMENT message both have 
sections containing sample mod_gzip configuration commands that
can just be 'cut and pasted' into your Apache httpd.conf file. ( See below ).
 
* TO GET IT UP AND RUNNING...
 
Just copy mod_gzip.so ( or ApacheModuleGzip.dll if Win32 )
to your Apache ../modules directory, cut-and-paste the sample
config ( from README.TXT file or the BOTTOM of this message )
to the BOTTOM of your httpd.conf file, set the 'mod_gzip_temp_dir'
parameter to some valid /tmp directory on your machine... ( /tmp should
be OK for Linux and C:\temp for Win32 ) and you are good to go.
 
Apache should immediately start compressing both static and
dynamic content back to anyone who is capable of receiving it.
 
* WHATSNEW.TXT

The following is a 'reprint' of the WHATSNEW.TXT file
for version 1.3.14.6e available on the mod_gzip home page.

* WHAT'S NEW with mod_gzip version 1.3.14.6

* Full <Location>, <Directory>, <VirtualHost> support

mod_gzip configuration commands can now be inserted
into any valid <Location>, <Directory> or <VirtualHost>
section in httpd.conf. This allows compression to
be 'enabled' or 'disabled' for only certain specific
Servers or Directories or 'customized' for files
requested from specific areas.


* mod_gzip now compresses ALL CGI dynamic output

mod_gzip_version 1.3.14.6 is now able to compress ALL
forms of CGI including output from mod_perl, mod_php
and any other 'Apache' module that generates dyanmic
output. All 'external' CGI dynamic output is still
fully supported as well.


* mod_gzip now compresses ALL SSI ( Server Side Includes )

mod_gzip_version 1.3.14.6 is now able to compress ALL
SSI ( Server Side Include ) output such as mod_include
and/or other internal/external modules that perform
'includes' for HTTP requests.


* mod_gzip_maximum_filesize

Many people were requesting the ability to specify an 'upper'
limit for compression candidacy to match the existing
'mod_gzip_minimum_filesize' so here it is.

If 'mod_gzip_maximum_filesize' is not specified or is
set to ZERO (0) then there is no 'upper limit' for files
that will be compressed.


* Dynamic output compression method

mod_gzip 1.3.14.6 will now default to an internal capture
method for the compression of dynamic output but the previous
'external' capture approach can still be used for extermal
CGI already know to work with prior versions.

mod_gzip_item_include !cgi-script <- Use newer 1.3.14.6 method

To use the orignal 'local call' style use a 'plus' sign instead
of 'exclamation point'.

mod_gzip_item_include +cgi-script  <- Use original 1.3.14.5 method


* mod_gzip_include [filename]

Allows you to 'include' a file during the normal httpd.conf
processing phase which contains additional mod_gzip_xxxx
configuration commands.

The 'include' file can contain valid mod_gzip configuration
commands and/or blank lines and comments just like any
'normal' httpd.conf configuration file. It must, of course,
also be a plain text 'flat-file' just like httpd.conf itself.

For example...

You might need a 'base' configuration for mod_gzip
and you might need to apply that 'base' configuration
to only a certain number of 'VirtualHost' sections
in your httpd.conf file.

All you have to do is put the 'base' commands
in a flat-text file named 'mod_gzip_base_config.inc'
( or whatever ) which could look like the following...

# mod_gzip_base_config.inc
#
# This 'include' file contains base level mod_gzip
# configuration commands and can be included anywhere
# in the main httpd.conf file with this command...
#
# mod_gzip_include mod_gzip_base_config.inc

mod_gzip_on                 Yes
mod_gzip_do_cgi             Yes
mod_gzip_do_static_files    Yes
mod_gzip_minimum_file_size  1000
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 60000
mod_gzip_verbose_debug      Yes
mod_gzip_keep_workfiles     No
mod_gzip_add_vinfo          Yes
mod_gzip_temp_dir           "C:/Program Files/Apache Group/Apache/temp"
mod_gzip_item_include       !.pl
mod_gzip_item_include       !application/x-httpd-php3
mod_gzip_item_include       text/*
mod_gzip_item_exclude       .css
mod_gzip_item_exclude       .js

# End of mod_gzip_base_config.inc

Now, lets' say that only <VirtualHost> sections 1, 3 and 5
will be using mod_gzip. Instead of having to duplicate the
mod_gzip configuration parameters must use the 'mod_gzip_include'
command to include the 'file' you created in only the places
where mod_gzip should be 'active'.

Like this...

<VirtualHost www.virtual_host1.com> # Virtual Host 1
...
mod_gzip_include mod_gzip_base_config.inc
...
</VirtualHost>

<VirtualHost www.virtual_host3.com> # Virtual Host 3
...
mod_gzip_include mod_gzip_base_config.inc
...
</VirtualHost>

<VirtualHost www.virtual_host5.com> # Virtual Host 5
...
mod_gzip_include mod_gzip_base_config.inc
...
</VirtualHost>

etc...

The 'mod_gzip_include' command should not be confused
with the 'mod_gzip_item_include' command which is used
to include 'items' for compression. 'mod_gzip_include'
simply 'includes' a file containing additional commands.

If the include file specified with a mod_gzip_include
command directive does NOT exist then you will get
the same error as you would get if Apache could not
find one the 'normal' configuration files...

Example: If mod_gzip command file 'mod_gzip.inc' is
not found during startup the Server will abort startup
as it normally would when a config file is 'not found'
and will print the following error message...

fopen: No such file or directory
mod_gzip_include: Cannot open include file [mod_gzip.inc]

If there is an error processing any config command
contained in a mod_gzip include file then you will,
of course, get the same 'error' message that Apache
would produce when it encounters and error reading
its own 'normal' config files...

Example: If a command called 'mod_gzip_foo_bar' is
encountered on line 4 of the include file you will see
the following startup error message...

mod_gzip_include: Syntax error on line 4 of base.inc:
Invalid command 'mod_gzip_foo_bar', perhaps mis-spelled or
defined by a module not included in the server configuration


* mod_gzip_add_vinfo [On/Off]

This new httpd.conf configuration parameter
can add a (+mod_gzip/x.x.x.x) version ID string
to both the Apache console startup message and the
HTTP response header Server ID string to
indicate that this Server has, in fact,
loaded the mod_gzip module.

'mod_gzip_add_vinfo Yes' turns this feature ON ( Default )
'mod_gzip_add_vinfo No'  turns this option OFF

If the option is OFF then mod_gzip will still be 'loaded'
into the server but the ID string will not appear at
startup or in the HTTP response header Server ID string.


* ZEROES now print in log entries instead of 'N/A'

If mod_gzip is never called then Input/Output size
and compression ratio values will be Apache default 'dashes'.

If mod_gzip is actually called then Input/Output size
and compression ratio values will be ( at least ) be ZEROES.

If the values are all ZERO and the 'result' is 'DECLINED:NOP'
then mod_gzip was called but 'declined' to process the transaction.

If 'result' value is 'DECLINED:OFF' or 'DECLINED:DYN1_OFF' then
this means mod_gzip was called but was not 'enabled' according
to the active Server/Directory configuration record.
Use 'mod_gzip_on Yes' entry to 'enable' mod_gzip for a
particular Server or Virtual Host or Location/Directory.


* r->proto_num 'downgrading' issue...

The issues regarding browsers 'claiming' to provide certain
levels of HTTP support without it being the 'truth' are
ongoing. Using 'mod_gzip_min_http' parameter to limit
compression delivery for only browsers that 'publish' a
minimum level of HTTP support works fairly well but there
is an additional issue regarding the Apache 'BrowserMatch'
parameter.

If there are any 'BrowserMatch' entries active in HTTPD
then be aware that the actual HTTP protocol support level
that will be reported to mod_gzip ( or any other Apache
module ) is the value AFTER a 'BrowserMatch' upgrade or
downgrade.

The following code fragment from mod_gzip explains the
issue...

/*
 * r->proto_num value...
 *
 * We have to 'accept' the 'r->proto_num' value in the request
 * record at all times because of the Apache 'downgrade' option.
 * The following piece of code is in Apache http_protocol.c file..
 *
 *  if (r->proto_num > HTTP_VERSION(1,0) &&
 *      ap_table_get(r->subprocess_env, "downgrade-1.0"))
 *    {
 *     r->proto_num = HTTP_VERSION(1,0);
 *    }
 *
 * The code snippet will 'downgrade' the 'r->proto_num' value
 * but leave the 'r->protocol' string alone so that's why even
 * though this might look like a 'bug' in the debug log files
 * ( r->proto_num doesn't match r->protocol string ) it's really
 * just the result of an Apache auto-downgrade.
 *
 * We have to assume that admin has a good reason for downgrading
 * a User-Agent and if that prevents the use of compression then
 * so be it. Too risky to assume what User agent can/can't do
 * based on actual r->protocol string.
 */

In other words...

If you set a 'minimum' HTTP value for compression delivery
with the 'mod_gzip_min_http' configuration directive then
don't be surprised if a browser that you 'thought' meets
the 'minimum' HTTP support level doesn't receive any compression.

The Server itself might be 'downgrading' the HTTP support level
for the browser with a 'BrowserMatch' directive in httpd.conf


* Image compression is 'back on'...

Due to a lot of confusion about certain version of Netscape
being unable to decompress images correctly all attempts to
compress images was temporarily 'disabled' in mod_gzip
version 1.3.14.5.

Version 1.3.14.6 of mod_gzip is now able to compress any
image again, if image compression has been specified in
the httpd.conf file with entries such as the following...

mod_gzip_item_include image/*   <- Compress ALL image mime types
mod_gzip_item_include image/gif <- Compress only GIF mime type
mod_gzip_item_include .gif      <- Compress only GIF file types
mod_gzip_item_include .jpg      <- Compress only JPEG file types

The code section that was temporarily disallowing image compression
is still present in the souce code and is shown below...

 #ifdef MOD_GZIP_SKIPS_IMAGES

 /*
  * This section (if activated) will block all attempts to
  * compress 'image/*' MIME type(s) even if user is trying to do
  * so via 'mod_gzip_item_include' statements. There are many
  * pending issues with regards to broken browsers being unable
  * to decode compressed images even though they say they fully
  * support IETF Content enocding via the 'Accept-encoding: gzip'
  * request header field.
  *
  * WARNING: Don't submit r->content_type to strstr() it if is
  * NULL or the API call will GP fault. Go figure.
  */

 if ( ( r->content_type ) && ( strstr( r->content_type, "image/" ) ) )
   {
    #ifdef MOD_GZIP_DEBUG1
    mod_gzip_printf( "%s: r->content_type contains 'image/'.",cn);
    mod_gzip_printf( "%s: Image compression is temporaily BLOCKED",cn);
    mod_gzip_printf( "%s: Exit > return( DECLINED ) >",cn);
    #endif

    #ifdef MOD_GZIP_USES_APACHE_LOGS

    /* Each 'DECLINE' condition provides a short ':WHYTAG' for logs */

    ap_table_setn(
    r->notes,"mod_gzip_result",ap_pstrdup(r->pool,"DECLINED:IMAGE"));

    if ( MOD_GZIP_DEBUG_TEST1(r) )
      {
       ap_log_error( "",0,APLOG_NOERRNO|APLOG_DEBUG, r->server,
       "mod_gzip: Graphics image compression option is temporarily disabled.");
      }

    #endif /* MOD_GZIP_USES_APACHE_LOGS */

    return DECLINED;
   }

 #endif /* MOD_GZIP_SKIPS_IMAGES */

The code to disable graphics compression can be 'turned on' gain
by setting the 'MOD_GZIP_SKIPS_IMAGES' define at compile time.


* Order of mod_gzip_item_include designations.

Prior to version 1.3.14.6 you had to be sure and list
'dynamic' inclusion entries BEFORE 'static' inclusion
records in order to prevent 'false pickups'.

Like this...

mod_gzip_item_include       !.cgi_script
mod_gzip_item_include       !.pl
mod_gzip_item_include       !application/x-httpd-php3
mod_gzip_item_include       text/*
mod_gzip_item_include       image/*

As of version 1.3.14.6 the 'order' in which inclusion/exclusion
records are listed doesn't matter.

This is now OK...

mod_gzip_item_include       image/*
mod_gzip_item_include       text/*
mod_gzip_item_include       !.cgi_script
mod_gzip_item_include       !.pl
mod_gzip_item_include       !application/x-httpd-php3
mod_gzip_item_include       text/*

...or you can simply 'mix them up' like this...

mod_gzip_item_include       !.cgi_script
mod_gzip_item_include       image/*
mod_gzip_item_include       !.pl
mod_gzip_item_include       text/*
mod_gzip_item_include       !application/x-httpd-php3
mod_gzip_item_include       text/*

The new configuration processing code will automatically
'prioritize' dynamic and static entries.

NOTE: You must still use the '!' character to indicate
that a Handler/Mime/File type generates 'dynamic' output.
Any item inclusion or inclusion record that does not have a
'!' designation will be considered a 'static' item and
will be compressed and transmitted 'as-is'.

* END OF WHATSNEW.TXT for mod_gzip version 1.3.14.6e


* SAMPLE CONFIGURATION

The following is a full reprint of a sample configuration
that should now be CORRECT.

# MOD_GZIP Configuration Directives
#
# All you should have to do to get up and running using
# mod_gzip with some basic STATIC and DYNAMIC compression
# capabilites is copy the mod_gzip dynamic library to your
# ../modules directory and then add this entire example
# configuration section to the BOTTOM of your httpd.conf file.
#
# Add this entire section including all lines down to where
# it says '# End of MOD_GZIP Configuration Directives'.
#
# The LoadModule command is included here for clarity
# but you may want to move it the the BOTTOM of your
# current LoadModule list in httpd.conf.
#
# Change the 'mod_gzip_temp_dir' to the name of a directory
# on your machine where temporary workfiles can be created
# and destroyed. This directory MUST be readable/writable
# by the Server itself while it is running. If the directory
# does not exist you must create it yourself with the right
# permissions before running the Server.
#
# If no 'mod_gzip_temp_dir' is specified then the default location
# for temporary workfiles will be 'ServerRoot' directory.
#
# The special mod_gzip log formats are, of course, optional.
#
# You must, of course, load the right module name for your OS
# so make sure the correct 'LoadModule' command is uncommented
# directly below...
 
# Load Win32 module...
LoadModule gzip_module modules/ApacheModuleGzip.dll
 
# Load UNIX module...
# LoadModule gzip_module modules/mod_gzip.so
 
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info1
LogFormat "%h %l %u %t \"%r\" %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2
 
# NOTE: This 'CustomLog' directive shows how to set your access.log file
# to use the mod_gzip format but please remember that for every 'CustomLog'
# directive that Apache finds in httpd.conf there will be corresponding
# line of output in the access.log file. If you only want ONE line of
# results in access.log for each transaction then be sure to comment out
# any other 'CustomLog' directives so that this is the only one.
 
CustomLog logs/access.log common_with_mod_gzip_info2
 
# Runtime control directives...
 
mod_gzip_on                 Yes
mod_gzip_do_cgi             Yes
mod_gzip_do_static_files    Yes
mod_gzip_minimum_file_size  300
mod_gzip_maximum_file_size  0
mod_gzip_add_vinfo          Yes
mod_gzip_verbose_debug      Yes
mod_gzip_maximum_inmem_size 60000
mod_gzip_keep_workfiles     No
mod_gzip_temp_dir           "C:/Program Files/Apache Group/Apache/temp"
 
# Item lists...
#
# Item names can be any one of the following...
#
# cgi-script - A valid 'handler' name
# text/*     - A valid MIME type name ( '*' wildcard allowed )
# .phtml     - A valid file type extension
 
# Dynamic items...
#
# The items listed here are the types of dynamic
# output that will be compressed...
#
# Dynamic items MUST have the "!" BANG character
# on the front of the item name.
#
mod_gzip_item_include !cgi-script
mod_gzip_item_include !.php
mod_gzip_item_include !.php3
mod_gzip_item_include !.phtml
 
# Static items...
#
# The items listed here are the types of static
# files that will be compressed...
#
mod_gzip_item_include text/*
 
# Uncomment this line to compress graphics
# when graphics compression is allowed again...
#mod_gzip_item_include image/*
 

# Exclusions... MIME types and FILE types...
#
# The items listed here will be EXCLUDED from
# any attempt to apply compression...
#
mod_gzip_item_exclude .js
mod_gzip_item_exclude .css
 
# Exclusions... HTTP support levels...
#
# By specifying a certain minimum level of HTTP support
# certain older user agents ( browsers ) can be
# automatically excluded from receiving compressed data.
#
# The item value should be in the same HTTP numeric format
# that Apache uses to designate HTTP version levels.
#
# 1001 = HTTP/1.1
#
# So 'mod_gzip_min_http 1001' means that a requesting
# user agent ( browser ) must report a minimum HTTP support
# level of 1.1 or it will not receive any compressed data.
#
mod_gzip_min_http 1001
 
# Debugging...
#
# If your Apache 'LogLevel' is set to 'debug' then
# mod_gzip will add some diagnostic and compression
# information to your error.log file for each request
# that is processed by mod_gzip.
#
# LogLevel debug
 
# End of MOD_GZIP Configuration Directives
 

That's it for now.
I am sure there are still issues.
 
Thanks to all who are volunteering to test mod_gzip and
make it a better program!
 
Yours...
Kevin Kiley
CTO, Remote Communications, Inc.
http://www.RemoteCommunications.com/
http://www.RemoteCommunications.com/rctpd/ - Free IETF Encoding Server
http://www.RemoteCommunications.com/apache/ab/ - Free Enhanced ApacheBench
http://www.RemoteCommunications.com/apache/mod_gzip/ - Free Content Acceleration module for
 
