[Mod_gzip] GZipping
Stephen Pierzchala
mod_gzip@lists.over.net
Tue, 25 Mar 2003 13:54:22 -0800
Janick:
Is your content statically compressed (i.e. compressed using GZIP from
the command line) or dynamically compressed (using mod_gzip,
mod_deflate, or the compression algorithms in PHP)?
If you are using statically compressed content, the content does not
need to worry about chunking, as the Content-Length is a known entity.
http://www.pierzchala.com/resume.html.gz
HTTP/1.1 200 OK
Date: Tue, 25 Mar 2003 21:43:10 GMT
Server: Apache/1.3.27
Cache-Control: max-age=300
Expires: Tue, 25 Mar 2003 21:48:10 GMT
Last-Modified: Tue, 25 Mar 2003 21:41:32 GMT
ETag: "1387f-1023-3e80cd0c"
Accept-Ranges: bytes
Content-Length: 4131
Connection: close
Content-Type: text/html
Content-Encoding: x-gzip
If you are using dynamic compression, mod_gzip produces a file with a
known Content-Length and chunking is not needed.
http://www.pierzchala.com/resume.html
HTTP/1.1 200 OK
Date: Tue, 25 Mar 2003 21:44:23 GMT
Server: Apache/1.3.27
Vary: Accept-Encoding
Cache-Control: max-age=3600
Expires: Tue, 25 Mar 2003 22:44:23 GMT
Last-Modified: Thu, 13 Mar 2003 18:18:43 GMT
ETag: "1386b-2c14-3e70cb83"
Accept-Ranges: bytes
Connection: close
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 4119
If you compress dynamic pages -- say those created with PHP -- then
chunking does occur.
http://www.pierzchala.com/homepage.php
HTTP/1.1 200 OK
Date: Tue, 25 Mar 2003 21:45:34 GMT
Server: Apache/1.3.27
Vary: Accept-Encoding
Cache-Control: max-age=300
Expires: Tue, 25 Mar 2003 21:50:34 GMT
Content-Encoding: gzip
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
You'll notice that there is no Content-Length with this PHP file.
Now, different response headers appear with different packages -- I am
using Apache 1.3.27 and mod_gzip 1.3.26a to do all of my Web serving. If
you use the compression native to PHP or if you use mod_deflate and
Apache 2.0.x, there are different results, and I will be happy to look
into those, or discuss those with you offline.
smp
Janick Bernet wrote:
> Hi, i found a post and this email on
> http://lists.over.net/pipermail/mod_gzip/
>
> The post is about a problem I have right now, namely how to set
> response-headers for compressed data and how to send compressed data in
> chunks. I thaught you maybe could help me if you have the time to, it
> seems that there are just a few people out there who know much about
> HTTP.
> Back to the subject, if I specify content-encoding: gzip and
> transfer-encoding: chunked I think after the RFC the whole identity
> should be gzip-encoded and then the new conten beeing sent in chunks.
> But thats not what i want, because the identity is generated dynamically
> and I only know parts of it. So know I want to send those parts
> compressed as individuals chunks. But neither the above headers nor
> transfer-encoding: gzip, chunked seem to work. Is this what I want
> possible anyway or not?
>
>
> Thanks a lort
> Janick Bernet
> Utesia AG
>
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> home: www.utesia.ch
> tel.: +41 (0)52 364 19 66
> fax.: +41 (0)52 364 19 93
>
>
> _______________________________________________
> mod_gzip mailing list
> mod_gzip@lists.over.net
> http://lists.over.net/mailman/listinfo/mod_gzip
>
>
>
--
****
Stephen Pierzchala
stephen@pierzchala.com
http://www.performanceguru.com/