Project

General

Profile

Bug #1048

mod_deflate - deflate.mimetypes setting

Added by Anonymous over 12 years ago. Updated almost 11 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
mod_deflate
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

I have been doing some testing over the last few releases of 1.5.0 and the trunk and they all have a problem with mod_deflate when you specify deflate.mimetypes like it says in the documentation. I was unable to find a bug or conversation about this so I am filling this out.

With my setup and when I specify deflate.mimetypes the server will only return static files with those mime-types and no other files. For example if I do not put text/javascript in the list any .js files are never returned. This affects any static file not in the list. I found to circumvent this is to comment out the deflate.mimetypes setting and it works fine.

Any thoughts on what is causing this. Let me know if you need OS information. I am on CentOS 4.x latest.


Snip from debug:
2007-02-23 16:41:16: (response.c.217) -- splitting Request-URI 
2007-02-23 16:41:16: (response.c.218) Request-URI  :  /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.219) URI-scheme   :  http 
2007-02-23 16:41:16: (response.c.220) URI-authority:  www.new.ampedesports.com 
2007-02-23 16:41:16: (response.c.221) URI-path     :  /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.222) URI-query    :   
2007-02-23 16:41:16: (response.c.276) -- sanatising URI 
2007-02-23 16:41:16: (response.c.277) URI-path     :  /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (configfile-glue.c.470) === start of 1 condition block === 
2007-02-23 16:41:16: (configfile-glue.c.422) HTTP["url"] ( /lib/jquery.autocomplete.js ) compare to \.pdf$ 
2007-02-23 16:41:16: (configfile-glue.c.485) 1 result: false 
2007-02-23 16:41:16: (configfile-glue.c.470) === start of 2 condition block === 
2007-02-23 16:41:16: (configfile-glue.c.422) HTTP["url"] ( /lib/jquery.autocomplete.js ) compare to \.php$ 
2007-02-23 16:41:16: (configfile-glue.c.485) 2 result: false 
2007-02-23 16:41:16: (response.c.393) -- before doc_root 
2007-02-23 16:41:16: (response.c.394) Doc-Root     : /home/esports/html/ 
2007-02-23 16:41:16: (response.c.395) Rel-Path     : /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.396) Path         :  
2007-02-23 16:41:16: (response.c.449) -- after doc_root 
2007-02-23 16:41:16: (response.c.450) Doc-Root     : /home/esports/html/ 
2007-02-23 16:41:16: (response.c.451) Rel-Path     : /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.452) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.469) -- logical -> physical 
2007-02-23 16:41:16: (response.c.470) Doc-Root     : /home/esports/html/ 
2007-02-23 16:41:16: (response.c.471) Rel-Path     : /lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.472) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.490) -- handling physical path 
2007-02-23 16:41:16: (response.c.491) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.490) -- handling physical path 
2007-02-23 16:41:16: (response.c.491) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.499) -- file found 
2007-02-23 16:41:16: (response.c.500) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (response.c.648) -- handling subrequest 
2007-02-23 16:41:16: (response.c.649) Path         : /home/esports/html/lib/jquery.autocomplete.js 
2007-02-23 16:41:16: (mod_staticfile.c.363) -- handling file as static file 
2007-02-23 16:41:16: (response.c.660) -- subrequest finished 
mod_deflate.c.1195: (trace) add deflate filter to filter chain
2007-02-23 16:41:16: (mod_deflate.c.1229) Content-Type: text/javascript 
2007-02-23 16:41:16: (mod_deflate.c.1236) mime-type: text/html 
2007-02-23 16:41:16: (mod_deflate.c.1236) mime-type: text/plain 
2007-02-23 16:41:16: (mod_deflate.c.1236) mime-type: text/css 
2007-02-23 16:41:16: (mod_deflate.c.1236) mime-type: text/xml 
2007-02-23 16:41:16: (mod_deflate.c.1247) No compression for mimetype: text/javascript 
2007-02-23 16:41:16: (response.c.129) Response-Header: 
HTTP/1.1 200 OK
Content-Type: text/javascript
ETag: "480264620" 
Accept-Ranges: bytes
Last-Modified: Fri, 16 Feb 2007 20:33:39 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Connection: close
Date: Fri, 23 Feb 2007 21:41:16 GMT
Server: lighttpd

Lighttpd conf:
server.modules              = (
                               "mod_rewrite",
                               "mod_deflate",
                               "mod_redirect",
                               "mod_alias",
                               "mod_access",
#                               "mod_cml",
#                               "mod_trigger_b4_dl",
                               "mod_auth",
                               "mod_status",
#                               "mod_setenv",
                               "mod_proxy_core",
                               "mod_proxy_backend_http",
                               "mod_proxy_backend_fastcgi",
#                               "mod_proxy_backend_scgi",
#                               "mod_proxy_backend_ajp13",
#                               "mod_simple_vhost",
#                               "mod_evhost",
#                               "mod_userdir",
#                               "mod_cgi",
                               "mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
                               "mod_expire",
#                               "mod_secdownload",
#                               "mod_rrdtool",
                               "mod_accesslog" )

deflate.enabled = "enable" 
deflate.compression-level = 9
deflate.mem-level = 9
deflate.window-size = 15
##deflate.bzip2 = "enable" 
deflate.allowed_encodings = ( "bzip2", "gzip", "deflate" )
deflate.min-compress-size = 2048
##deflate.sync-flush = "enable" 
##deflate.output-buffer-size = 8192
deflate.work-block-size = 512
deflate.mimetypes = ("text/html", "text/plain", "text/css", "text/xml")
deflate.debug = "enable" 

$HTTP["url"] =~ "\.php$" {
    proxy-core.balancer = "carp" 
    proxy-core.allow-x-sendfile = "enable" 
    proxy-core.check-local = "enable" 
    proxy-core.protocol = "fastcgi" 
    proxy-core.backends = (                                             "127.0.0.1:1026",
                "127.0.0.1:1027",
                "127.0.0.1:1028",
                 )
    proxy-core.max-pool-size = 16
}

-- AB

History

#1

Updated by jakabosky over 12 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

The only way I was able to re-produce the same trace messages and same response headers was to add "text/javascript" to compress.filetype array:

compress.filetype = ("text/javascript")

This message mean that mod_deflate didn't try to compress the response content.
mod_deflate.c.1247) No compression for mimetype: text/javascript

This response header shows that the response was compressed:
Content-Encoding: gzip

In my tests the static content was returned compressed like it should be. Please check your compress.filetype settings or disable mod_compress.

#2

Updated by stbuehler almost 11 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom