From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8BB9013800E for ; Thu, 2 Aug 2012 03:05:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F2F321C006 for ; Thu, 2 Aug 2012 03:05:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EA932E079C for ; Thu, 2 Aug 2012 02:31:36 +0000 (UTC) Received: from [192.168.26.5] (ip98-164-193-252.oc.oc.cox.net [98.164.193.252]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 3AA641B4026 for ; Thu, 2 Aug 2012 02:31:36 +0000 (UTC) Message-ID: <5019E686.5030407@gentoo.org> Date: Wed, 01 Aug 2012 19:31:34 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120719 Thunderbird/14.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] portage: HTTP if-modified-since and compression References: <5019D1B7.5050807@gentoo.org> In-Reply-To: <5019D1B7.5050807@gentoo.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 326d5942-2c6a-4207-9503-495d17064a7c X-Archives-Hash: 42bac4669a3de7ab7c468ca11581fcbe On 08/01/2012 06:02 PM, Zac Medico wrote: > On 08/01/2012 04:32 PM, Mark Kubacki wrote: >> Hi Portage devs, >> >> The attached patches fix some issues I've noticed as maintainer and >> user of Gentoo binhost(s). They're made against master/HEAD and can >> easily be backported to 2.1*. >> >> The first patch enables Portage to skip downloading a remote index if >> the local copy is recent enough. E.g., the remote index didn't change >> between to "emerge"-runs. This is done by setting "If-Modified-Since" >> request-header. The server responds with HTTP code 304 and Portage >> doesn't even load a single byte of the (large) index file. >> >> By the second patch Portage will download remote indices—which are >> text-files after all—compressed, if the remote server supports that. >> Although de-compression introduces a small latency, this will save >> bandwidth and transmission time. If the index needs to be fetched at >> all, that is (see the patch above). >> >> An index' TIMESTAMP entry is set before the corresponding file gets >> written. If the difference between TIMESTAMP and modification time >> ("mtime") is greater than or the times span one second, remote index >> files will be loaded despite the "If-Modified-Since" header. This is >> because TIMESTAMP of the local copy is compared with the remote index' >> "mtime". The third patch fixes that by setting "mtime" = TIMESTAMP. >> > > Thanks, I've applied your patches: > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e06cb6d66db37ac7ab77acf65038b1f770c13c96 > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cbebf76d8e5666aad4984f87c2be83d474fe5a7e > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13abe0398fbe724218c8c9ac2597ebe15d7db7e1 > > I made a few trivial change in order to make them compatible with > python3. Also, I made it use the old behavior for protocols other than > http and https, in order to avoid issues with ftp like this one: > > https://bugs.gentoo.org/show_bug.cgi?id=415579 > Fix python2 http password breakage: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fbeb8101b20e232b2e8c55c9554b5fc9c5c72089 BUG: The if_modified_since parameter appears to be ignored when using http password authentication. -- Thanks, Zac