Bug #1709
closedwrong content-length with mod_fastcgi/mod_deflate combo
Description
with static content it's working fine:
2008-07-02 21:41:14: (request.c.294) fd: 7 request-len: 221
GET /favicon.ico HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept-Encoding: gzip
Host: xxx:2080
2008-07-02 21:41:14: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Connection: close
Content-Type: application/octet-stream
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 697
Date: Wed, 02 Jul 2008 19:41:14 GMT
Server: lighttpd
2008-07-02 21:41:28: (request.c.294) fd: 7 request-len: 198
GET /favicon.ico HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: xxxx:2080
2008-07-02 21:41:28: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Connection: close
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 2551
Date: Wed, 02 Jul 2008 19:41:28 GMT
Server: lighttpd
however with dynamic content served via a tcp connected fastcgi server, the new size is not calculated at all (the uncompressed content-length value is used):
2008-07-02 21:40:15: (request.c.294) fd: 7 request-len: 187
GET / HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: xxx:2080
2008-07-02 21:40:15: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Connection: close
Content-Length: 21097
Content-Type: text/html;charset=utf-8
Date: Wed, 02 Jul 2008 19:40:15 GMT
Server: lighttpd
with gzip encoding, still the same size:
2008-07-02 21:40:33: (request.c.294) fd: 7 request-len: 210
GET / HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept-Encoding: gzip
Host: xxx:2080
2008-07-02 21:40:33: (response.c.128) Response-Header:
HTTP/1.1 200 OK
Connection: close
Transfer-Encoding: chunked
Content-Length: 21097
Content-Type: text/html;charset=utf-8
Vary: Accept-Encoding
Content-Encoding: gzip
Date: Wed, 02 Jul 2008 19:40:33 GMT
Server: lighttpd
relevant config:
url.rewrite-once = ( "^/((?:static|pub|server-status)/.*)" => "/$1", "^/favicon.ico" => "/favicon.ico", "^/robots.txt" => "/robots.txt", "^/(.*)" => "/fcgi/$1" ) fastcgi.server = ( "/fcgi" => ( ( "host" => "127.0.0.1", "port" => 8080, "check-local" => "disable"), ) ) $HTTP["url"] =~ "^/" { setenv.add-environment = ( "SCRIPT_NAME" => "/" ) } server.max-fds = 6144 server.max-connections = 2048 server.max-worker = 4 server.event-handler = "linux-sysepoll" server.network-backend = "writev" deflate.sync-flush = "disable" deflate.enabled = "enable" deflate.compression-level = 9 deflate.mem-level = 9 deflate.window-size = 15 deflate.bzip2 = "disable" deflate.allowed_encodings = ( "gzip", "deflate" ) debug.log-request-header = "enable" fastcgi.debug = 1 debug.log-response-header = "enable"
-- m.stemeseder
Updated by stbuehler over 16 years ago
- Status changed from New to Fixed
- Resolution set to invalid
There is no official mod_deflate in 1.4.x - post bugs in the 1.4 secion on http://trac.lighttpd.net/trac/wiki/Mod_Deflate
Updated by gstrauss over 8 years ago
- Related to Feature #1824: Adding mod_deflate to 1.4.xx added
Updated by gstrauss over 8 years ago
- Description updated (diff)
- Category deleted (
build_autotools) - Priority changed from High to Normal
- Target version deleted (
1.4.20)
Also available in: Atom