Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2001 22:52:02 +1300
From:      "Dan Langille" <dan@langille.org>
To:        "Akinori MUSHA" <knu@iDaemons.org>
Cc:        hackers@freebsd.org, knu@freebsd.org
Subject:   Re: gzip and cvsweb.cg
Message-ID:  <200101310952.WAA70602@ducky.nz.freebsd.org>
In-Reply-To: <86wvbd38mw.wl@archon.local.idaemons.org>
References:  <Pine.BSF.4.32.0101301409530.6394-100000@xeon.unixathome.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 Jan 2001, at 14:35, Akinori MUSHA wrote:

> At Tue, 30 Jan 2001 14:26:01 +1300 (NZDT),
> Dan Langille wrote:
> > I've noticed that cvsweb.cgi sometimes gives me GZIP and sometimes not.  I
> > tracked down a fix for my needs, but would like some feedback please.
> > 
> > The problem arose when FreshPorts old me it couldn't do anything with a
> > Makefile it had just obtained (via fetch), so I went to look.  What I
> > found was a garbled Makefile.  Actually, it was GZIP'd, not ASCII.
> > 
> > $ fetch -o Makefile
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/www/mnoGoSearch-current/Makefile?rev=1.3
> > Receiving Makefile: 0 Kbytes
> > 897 bytes transferred in 0.0 seconds  (603.71 Kbytes/s)
> > 
> > $ file Makefile
> > Makefile: gzip compressed data, deflated, last modified: Tue Jan 30
> > 14:00:38 2001, max speed, os: Unix
> > 
> > 
> > So then I started experimenting, and check the web interface.  Then I used
> > this:
> > 
> > $ fetch -o Makefile
> > http://www.FreeBSD.org/cgi/cvsweb.cgi/~checkout~/ports/www/mnoGoSearch-current/Makefile?rev=1.3
> > Receiving Makefile: 1 Kbytes
> > 1799 bytes transferred in 0.0 seconds  (1241.55 Kbytes/s)
> > 
> > $ file Makefile
> > Makefile: ASCII text
> > 
> > Which is what one would expect.
> > 
> > Why does one give the expected results and the other doesn't?  I expected
> > both to give the same.
> 
> Hmm, this reminds me of the transparent HTTP proxy issue.  I suspect
> an HTTP proxy server is between your box and www.FreeBSD.org and it
> had a cache of the former page and didn't for the latter.

OK.  Explain this.  When we telnet to port 80 and fetch it, we don't get 
gzip.  When we use lynx, it doesn't come back gzip'd (does lynx know 
gzip?).

[dan@lists:~/temp] $ lynx -dump 
http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/mnoGoSearch-
current/Makefile?rev=H
EAD > Makefile
[dan@lists:~/temp] $ file Makefile
Makefile: ASCII text

[dan@lists:~/temp] $ fetch -o Makefile 
http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/mnoGoSearch-
current/Makefil
e?rev=HEAD
Receiving Makefile: 2 Kbytes
2082 bytes transferred in 0.0 seconds  (1233.01 Kbytes/s)
[dan@lists:~/temp] $ file Makefile
Makefile: ASCII text

[dan@lists:~/temp] $ fetch -o Makefile 
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/www/mnoGoSe
arch-curr
ent/Makefile?rev=HEAD
Receiving Makefile: 1 Kbytes
1029 bytes transferred in 0.0 seconds  (716.23 Kbytes/s)

[dan@lists:~/temp] $ file Makefile
Makefile: gzip compressed data, deflated, last modified: Wed Jan 31 
10:47:57 2001, max speed, os: Unix

go figure...

--
Dan Langille
pgpkey - finger dan@unixathome.org | http://unixathome.org/finger.php


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101310952.WAA70602>