From owner-freebsd-ports@FreeBSD.ORG Sun Apr 6 00:15:31 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0F2137B401 for ; Sun, 6 Apr 2003 00:15:31 -0800 (PST) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76FEF43F85 for ; Sun, 6 Apr 2003 00:15:30 -0800 (PST) (envelope-from bzeeb-lists@zabbadoz.net) Received: from localhost (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id A14311FFBA8; Sun, 6 Apr 2003 10:15:28 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 8AF8E1FFB6C; Sun, 6 Apr 2003 10:15:27 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 447FA15350; Sun, 6 Apr 2003 08:15:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 30F9F1529B; Sun, 6 Apr 2003 08:15:10 +0000 (UTC) Date: Sun, 6 Apr 2003 08:15:10 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Kris Kennaway In-Reply-To: <20030406053332.GA49653@rot13.obsecurity.org> Message-ID: References: <20030323224757.GA27897@rot13.obsecurity.org> <20030406053332.GA49653@rot13.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS snapshot-20020300 cc: freebsd-ports@FreeBSD.ORG Subject: Re: bento tbz files decompressed on the fly when downloading ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 08:15:32 -0000 On Sat, 5 Apr 2003, Kris Kennaway wrote: Hi, > > > > Is there some transparent decompression on bento ? > > > > > > Oops..yes :) I'll have to try and exclude the package directories. > > > > Could you solve this ? > > I took a look at this but couldn't work out how to solve it. apache > on bento is using mod_bunzip2 with the following config: > > # Added kk 010203 > LoadModule bunzip2_module libexec/apache/mod_bunzip2.so > AddModule mod_bunzip2.c > AddHandler send-bunzip2 .html .log > RewriteEngine on > RewriteCond /usr/local/www/data/%{REQUEST_FILENAME} !-f > RewriteRule ^(.+)\.log$ $1.log.bz2 > > It appears there is an implicit "decompress all .bz2 and .tbz files" > that needs to be selectively disabled for files in the package trees. > I don't know how to do this. Is there some AddHandler for *.tbz ? If not there seems to be a hard coded handler */* in the module (not being an expert but had a look at it for a minute). Can you try following either in a section or in a .htaccess for those directories: RemoveHandler .tbz I also had seen another possible solution/workaround for the archives: the client needs to send an Accept-Encoding: bzip2 header. Verified to work (sorry for no line wrapping). Took some short files: --- my orig httpget --- bz@accu:~/lab/httpget-orig> ./httpget http://bento.freebsd.org/errorlogs/i386-packages-5-latest/russian/ru-d1489-1.5.tbz Fetching http://bento.freebsd.org/errorlogs/i386-packages-5-latest/russian/ru-d1489-1.5.tbz Connecting to proxy proxy-in.int.zabbadoz.net:8080... connected ---> 'ru-d1489-1.5.tbz' Sent request, awaiting response: 200 OK [text/plain] Received: 40960 bz@accu:~/lab/httpget-orig> file ru-d1489-1.5.tbz ru-d1489-1.5.tbz: GNU tar archive --- end --- --- my httpget patched with Accept-Encoding: bzip2 --- bz@accu:~/lab/httpget> ./httpget http://bento.freebsd.org/errorlogs/i386-packages-5-latest/russian/ru-d1489-1.5.tbz Fetching http://bento.freebsd.org/errorlogs/i386-packages-5-latest/russian/ru-d1489-1.5.tbz Connecting to proxy proxy-in.int.zabbadoz.net:8080... connected ---> 'ru-d1489-1.5.tbz.0' Sent request, awaiting response: 200 OK Length: 9146 Received: 9146 bz@accu:~/lab/httpget> file ru-d1489-1.5.tbz.0 ru-d1489-1.5.tbz.0: bzip2 compressed data, block size = 900k --- end --- I think neither fetch/libfetch nor wget lets me set Accept-Encoding parameter... -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/