[Mod_gzip] Q: DECLINED:HAS_CE

Rolf Suennen mod_gzip@lists.over.net
Tue, 15 Apr 2003 20:30:58 +0200


hi everybody,
i have a strange problem while compressing
cold fusion (mx) pages whith mod_gzip. when
i call a web-page using mod_gzip i receive
an empty page. in the log-file is written:
DECLINED:HAS_CE



i'm using:
=========
- win2k apache / 2.0.45
- mod_gzip / mod_gzip-2.0.45
- cfmx with updater 3.0
- i load mod_gzip before the mod_jrun20 is loaded
  (although i checked it in both ways :))



what i've already checked:
=========================
'has_ce' meens that there already is a content
encoding in the page and mod_gzip doesn't compress
pages that are already encoded. (i would expect
to receive an 'SEND_AS_IS:HAS_CE' - but anyway:))

so i checked the header of the concerning page @:
http://www.schroepl.net/cgi-bin/http_trace.pl

the url i've checked is:
http://www.triggerfish.de/magazin/home.cfm?p=102
[this page is not compressed - but should be]

but i can't find any content encoding in the
html-header.



what i suppose:
==============
@ http://www.iem.pw.edu.pl/ftp/FreeBSD/distfiles/mod_gzip.c
i found the following function included in mod_gzip's source:

if ( strstr( has_encoding, "gzip" ) ) {
  [...]

ap_table_setn(r->notes,"mod_gzip_result",ap_pstrdup(r->pool,"DECLINED:HAS_CE
:GZIP"));
}

does that meen, that my cfm-pages are compressed twice?



please find below:
==================
- html-header
- jrun-settings in httpd.conf
- mod_gzip directive

t.i.a. for your support !


ciao,
rolf suennen
triggerfish.de


[snip]



this is the html-header:
========================
[ 15] HTTP/1.0 200 OK
[ 48] Cache-Control: no-cache="set-cookie,set-cookie2"
[ 17] Connection: close
[ 35] Date: Tue, 15 Apr 2003 18:05:24 GMT
[ 29] Server: Apache/2.0.45 (Win32)
[ 23] Content-Language: de-DE
[ 43] Content-Type: text/html; charset=ISO-8859-1
[ 38] Expires: Thu, 01 Dec 1994 16:00:00 GMT
[ 62] Set-Cookie: CFID=;expires=Mon, 15-Apr-2002 17:54:45 GMT;path=/
[ 65] Set-Cookie: CFTOKEN=;expires=Mon, 15-Apr-2002 17:54:45 GMT;path=/
[ 53] Set-Cookie: JSESSIONID=80301124321050429924375;path=/
      Client-Date: Tue, 15 Apr 2003 18:06:06 GMT
      Client-Response-Num: 1



these are the jrun-settings in httpd.conf:
=========================================
# JRun Settings
LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/2/mod_jrun20.so"
<IfModule mod_jrun20.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ssl false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore
"C:/CFusionMX/runtime/lib/wsconfig/2/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51010
    #JRunConfig Errorurl <optionally redirect to this URL on errors>
    AddHandler jrun-handler .cfm .cfc .cfml .jsp .jws
</IfModule>


this is the way i use the mod_gzip directive:
============================================
<IfModule mod_gzip.c>
    mod_gzip_on yes
    mod_gzip_dechunk yes
    mod_gzip_keep_workfiles no
    mod_gzip_temp_dir "C:/Programme/Apache Group/Apache2/gzip_tmp"
    mod_gzip_minimum_file_size  300
    mod_gzip_maximum_file_size  0
    mod_gzip_maximum_inmem_size 1000000

    mod_gzip_item_include mime ^text/*
    mod_gzip_item_include handler jrun-handler
    mod_gzip_item_include file \.htm$
    mod_gzip_item_include file \.html$

    mod_gzip_item_exclude file \.css$
    mod_gzip_item_exclude file \.js$
    mod_gzip_item_exclude file \.cfc$
</IfModule>





--------------------------------------------
the function that seems to produce the error:
============================================

http://www.iem.pw.edu.pl/ftp/FreeBSD/distfiles/mod_gzip.c

DECLINED:HAS_CE
===============

if ( strstr( has_encoding, "gzip" ) )
{
 #ifdef USE_MOD_GZIP_DEBUG1
 fprintf( gzdb_fh1, "%s: 'Content-encoding:' field contains 'gzip'
designator...\n",cn);
 fprintf( gzdb_fh1, "%s: Pre-compression is assumed.\n",cn);
 fprintf( gzdb_fh1, "%s: Exit > return( DECLINED ) >\n",cn);
 fclose( gzdb_fh1 );
 #endif /* USE_MOD_GZIP_DEBUG1 */

 #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:HAS_CE
:GZIP"));

 #endif /* MOD_GZIP_USES_APACHE_LOGS */

 return DECLINED;
}