From owner-freebsd-hackers Wed Jan 31 1:52:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ducky.nz.freebsd.org (ns1.unixathome.org [203.79.82.27]) by hub.freebsd.org (Postfix) with ESMTP id 8D19937B684; Wed, 31 Jan 2001 01:52:12 -0800 (PST) Received: from wocker (wocker.int.nz.freebsd.org [192.168.0.99]) by ducky.nz.freebsd.org (8.9.3/8.9.3) with ESMTP id WAA70602; Wed, 31 Jan 2001 22:52:05 +1300 (NZDT) Message-Id: <200101310952.WAA70602@ducky.nz.freebsd.org> From: "Dan Langille" Organization: novice in training To: "Akinori MUSHA" Date: Wed, 31 Jan 2001 22:52:02 +1300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: gzip and cvsweb.cg Reply-To: dan@langille.org Cc: hackers@freebsd.org, knu@freebsd.org In-reply-to: <86wvbd38mw.wl@archon.local.idaemons.org> References: X-mailer: Pegasus Mail for Win32 (v3.12c) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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