[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

gzip output



Today I noticed that there is a bug in the handlig of gzip output, I don't know if someone is aware of this, but I mail to the list because I'll be out until wednesday, and I have been unable to check the code.

The problem occurs when the client supports gzip and tux sends the .gz archive, the Content-Length header shows the size of the original and uncompressed file, causing mozilla to never show the page as done, and wget to hang.

The first two examples are from an apache server with mod_gzip, the correct content length is send.

jnerin@pickard:/home/public/mod_gzip> wget -Y off
http://pickard.leggio.es/~jnerin/C++/
V2TICPP-2nd-ed-html/Chapter11.html
--13:34:19--
http://pickard.leggio.es/%7Ejnerin/C++/V2TICPP-2nd-ed-html/Chapter
11.html
           => `Chapter11.html'
Resolviendo pickard.leggio.es... hecho.
Conectando con pickard.leggio.es[192.168.1.12]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 179,279 [text/html]

100%[====================================>] 179,279        3.89M/s
ETA 00:00

13:34:19 (3.89 MB/s) - `Chapter11.html' guardado [179279/179279]

jnerin@pickard:/home/public/mod_gzip> wget -Y off
http://pickard.leggio.es/~jnerin/C++/V2TICPP
-2nd-ed-html/Chapter11.html --header="Accept-Encoding: gzip" -S
--13:36:20--
http://pickard.leggio.es/%7Ejnerin/C++/V2TICPP-2nd-ed-html/Chapter11.html
           => `Chapter11.html.2'
Resolviendo pickard.leggio.es... hecho.
Conectando con pickard.leggio.es[192.168.1.12]:80... conectado.
Petición HTTP enviada, esperando respuesta...
 1 HTTP/1.1 200 OK
 2 Date: Fri, 01 Mar 2002 12:36:20 GMT
 3 Server: Apache/1.3.20 (Linux/SuSE) PHP/4.0.6 mod_gzip/1.3.19.1a
 4 Last-Modified: Tue, 22 Feb 2000 07:54:48 GMT
 5 ETag: "1d6c1f-2bc4f-38b240c8"
 6 Accept-Ranges: bytes
 7 Keep-Alive: timeout=15, max=100
 8 Connection: Keep-Alive
 9 Content-Type: text/html
10 Content-Encoding: gzip
11 Content-Length: 43430

100%[==================================================>] 43,430
41.42M/s    ETA 00:00

13:36:20 (41.42 MB/s) - `Chapter11.html.2' guardado [43430/43430]

These two examples are from my tux server, the last one is wget hung because it received the compressed file (albeit not entirely, it seems) but it thinks it must get more.

jnerin@pickard:/home/public/mod_gzip> wget -Y off
http://redvip.homelinux.net/varios/colores.html

--13:38:06--  http://redvip.homelinux.net/varios/colores.html
           => `colores.html.2'
Resolviendo redvip.homelinux.net... hecho.
Conectando con redvip.homelinux.net[80.224.211.167]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 38,655 [text/html]

100%[====================================>] 38,655        13.51K/s
ETA 00:00

13:38:09 (13.51 KB/s) - `colores.html.2' guardado [38655/38655]

jnerin@pickard:/home/public/mod_gzip> wget -Y off
http://redvip.homelinux.net/varios/colores.html
--header="Accept-Encoding: gzip"
--13:38:16--  http://redvip.homelinux.net/varios/colores.html
           => `colores.html.3'
Resolviendo redvip.homelinux.net... hecho.
Conectando con redvip.homelinux.net[80.224.211.167]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 38,655 [text/html]

10% [==>                                  ] 4,075         15.07K/s
ETA 00:02

[root@head (13:36:09) /var/www/html/varios]# ls -l colores.html*
-rw-r--r--    1 coma     coma        38655 feb  8  1998 colores.html
-rw-r--r--    1 root     root         4621 mar  1 13:29 colores.html.gz
[root@head (13:36:15) /var/www/html/varios]#

Thanks, note that I have the compression option enabled and so on, the only problem is the content length header, the rest seems to work ok, I will be back on wednesday, and then I will have time to look it up, but if somebody finds it before beter ;)


-- Jorge Nerin <comandante@zaralinux.com>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []