Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24AEF8F70 for ; Fri, 26 Aug 2011 14:47:49 +0000 (UTC) Received: (qmail 36182 invoked by uid 500); 26 Aug 2011 14:47:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 36041 invoked by uid 500); 26 Aug 2011 14:47:47 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 36033 invoked by uid 99); 26 Aug 2011 14:47:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2011 14:47:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ames.greg@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qw0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2011 14:47:41 +0000 Received: by qwj8 with SMTP id 8so2910075qwj.18 for ; Fri, 26 Aug 2011 07:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=uG/3v2LaAwqSoR0papcm+L1/sZZgO3pJoyCIt49Ghu0=; b=xVIQFf31/sEFMhkxjcI08jckx57Ixtlc4akVeKguunFXJ/GHo40nOMhcmHWCx+bFJC OHJbJ9qLHV0/iJ7Qk+91G+umXlmmtTzNrU8cAfW1MhGQ2W0T6A3+coU2v2RAp1JL5PRe aYxfsun4HlyJcso7TmKYyURYHh2d2TwrnLPGA= MIME-Version: 1.0 Received: by 10.42.156.134 with SMTP id z6mr1216960icw.245.1314370040275; Fri, 26 Aug 2011 07:47:20 -0700 (PDT) Received: by 10.42.225.132 with HTTP; Fri, 26 Aug 2011 07:47:20 -0700 (PDT) In-Reply-To: <20110825230243.A2C8E23888E7@eris.apache.org> References: <20110825230243.A2C8E23888E7@eris.apache.org> Date: Fri, 26 Aug 2011 10:47:20 -0400 Message-ID: Subject: Re: svn commit: r1161791 - /httpd/httpd/trunk/modules/http/byterange_filter.c From: Greg Ames To: dev@httpd.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e8d345aa26604ab699f57 --90e6ba6e8d345aa26604ab699f57 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Aug 25, 2011 at 7:02 PM, wrote: > > Log: > Put parsed ranges into an array and perform merges on that array. > > + if (i > 0) { > + if (!(ranges[i].start > ranges[i-1].end + 1 && > + ranges[i].end < ranges[i-1].start - 1)) > + { > + if (ranges[i].start < ranges[i-1].start) > + ranges[i-1].start = ranges[i].start; > ok, the two lines above seem reasonable. > + if (ranges[i].end > ranges[i-1].end) > + ranges[i-1].end = ranges[i].end; > I don't understand the two lines above. Suppose we have 1000-2000,3000-4000. That should pass thru unchanged. But I believe we will see 1000-4000,3000-4000 instead. Greg --90e6ba6e8d345aa26604ab699f57 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Aug 25, 2011 at 7:02 PM, <sf@apache.org> wrote:

Log:
Put parsed ranges into an array and perform merges on that array.

+ =A0 =A0 =A0 =A0if (i > 0) {
+ =A0 =A0 =A0 =A0 =A0 =A0if (!(ranges[i].start > ranges[i-1].end =A0 + 1= &&
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ranges[i].end =A0 < ranges[i-1].sta= rt - 1))
+ =A0 =A0 =A0 =A0 =A0 =A0{
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ranges[i].start < ranges[i-1].start= )
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ranges[i-1].start =3D ranges[i].st= art;

ok, the two lines above seem reasonable.
= =A0
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ranges[i].end > ranges[i-1].end) + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ranges[i-1].end =3D ranges[i].end;=

I don't understand the two lines above.=A0 Su= ppose we have 1000-2000,3000-4000.=A0 That should pass thru unchanged.=A0 B= ut I believe we will see 1000-4000,3000-4000 instead.
=A0
Greg
--90e6ba6e8d345aa26604ab699f57--