From owner-freebsd-hackers Mon Jan 29 21:35:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rdc1.kt.home.ne.jp (ha2.rdc1.kt.home.ne.jp [203.165.9.243]) by hub.freebsd.org (Postfix) with ESMTP id 6AE2537B400; Mon, 29 Jan 2001 21:35:06 -0800 (PST) Received: from daemon.local.idaemons.org ([203.165.161.10]) by mail.rdc1.kt.home.ne.jp (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <20010130053504.UJZ26050.mail.rdc1.kt.home.ne.jp@daemon.local.idaemons.org>; Mon, 29 Jan 2001 21:35:04 -0800 Received: by daemon.local.idaemons.org (8.11.1/3.7W) id f0U5Z4261897; Tue, 30 Jan 2001 14:35:04 +0900 (JST) Date: Tue, 30 Jan 2001 14:35:03 +0900 Message-ID: <86wvbd38mw.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: Dan Langille Cc: hackers@freebsd.org, knu@freebsd.org Subject: Re: gzip and cvsweb.cgi In-Reply-To: References: User-Agent: Wanderlust/2.5.4 (Smooth) SEMI/1.14.2 (=?ISO-8859-1?Q?Daish=F2?= =?ISO-8859-1?Q?ji?=) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 MULE XEmacs/21.1 (patch 13) (Crater Lake) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.2 - =?ISO-8859-1?Q?=22Daish=F2ji=22?=) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. If that is the situation, cvsweb.cgi may have to add a header field "Pragma: no-cache" or "Expire: ..(soon).." for such proxies that cache even a CGI output. (But that applies to most CGI programs...) -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "We're only at home when we're on the run, on the wing, on the fly" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message