Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 53393 invoked from network); 12 Oct 2004 21:26:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Oct 2004 21:26:03 -0000 Received: (qmail 92838 invoked by uid 500); 12 Oct 2004 21:25:58 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 92570 invoked by uid 500); 12 Oct 2004 21:25:56 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 92550 invoked by uid 99); 12 Oct 2004 21:25:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [194.25.134.21] (HELO mailout10.sul.t-online.com) (194.25.134.21) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 12 Oct 2004 14:25:55 -0700 Received: from fwd01.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1CHU9Z-0007ax-00; Tue, 12 Oct 2004 23:25:53 +0200 Received: from cerberus.heimnetz.de (bKA-ayZ6weyRtyFJCV-9PSFplcAED2PY-ZuJDOBGOp6xb2scpFT5ob@[80.135.184.6]) by fwd01.sul.t-online.com with esmtp id 1CHU9J-1eP4Do0; Tue, 12 Oct 2004 23:25:37 +0200 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 223851721C for ; Tue, 12 Oct 2004 23:25:33 +0200 (CEST) Message-ID: <416C4BCF.50204@gmx.de> Date: Tue, 12 Oct 2004 23:25:35 +0200 From: r.pluem@t-online.de (=?UTF-8?B?UsO8ZGlnZXIgUGzDvG0=?=) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: de, en, de-de, en-gb MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [RFC] a lazy byterange filter References: <20041012130811.GC13375@redhat.com> <20041012163900.00002300@fe-pc-092.int.cinetic.de> <20041012151702.GB15464@redhat.com> In-Reply-To: <20041012151702.GB15464@redhat.com> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-ID: bKA-ayZ6weyRtyFJCV-9PSFplcAED2PY-ZuJDOBGOp6xb2scpFT5ob X-TOI-MSGID: 944e9bcc-c8e3-40ce-ac45-2f4726b64b3f X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe Orton wrote: > On Tue, Oct 12, 2004 at 04:39:00PM +0200, André Malo wrote: > >>* Joe Orton wrote: >> >> >>>1) it's not particularly useful to be able to retrieve byteranges of the >>>output of some SSI, CGI or PHP script output, if the output may change >>>for each request anyway. >> >>Not agreed. It is, especially for download scripts very useful (which e.g. >>count the number of downloads or whatever). > > > OK sure, but the point you have to argue is why it's useful to support > this feature *in httpd*. N million 1.3 users live without it. I'm > arguing that you can and should implement byteranging in your CGI script > if you want that, since that is the place where it is efficient to do > so. If you serve DVD images with your counting-CGI do you really want > to pass 2Gb through the filter chain then discard it, for those "last 5 > bytes" byterange requests? > I agree with André on that. Your DVD example is an extreme example. Most times much less data will be transfered. Other applications that require the current behaviour are CGI scripts / Tomcat servlets and jsps that protect downloads with a custom authorization. So I fear the change will break partial downloads in these situations and I do not think in general that every kind of application should implement its own byteranging instead of doing this at a central position like the webserver. I think the application should implement it by itself if the operation it does is a) costly b) produces very much data (like your DVD example) On the other hand I understand the current problem. As far as I can see it is ONLY neccessary to save the whole content in memory if the request contains multiple byteranges. If the request only contains one byterange I think it would be sufficient to simply drop the uneeded data and only forward the requested one. So my idea would be to have the behaviour of your patch if we have multiple byteranges and the old behaviour if we have one byterange. But in this case the code needs to be adjusted in a way that it drops all unneeded content immediately to avoid the memory problem. Thoughts? Regards Rüdiger