Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 26745 invoked from network); 26 Feb 2004 14:18:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Feb 2004 14:18:22 -0000 Received: (qmail 81162 invoked by uid 500); 26 Feb 2004 14:18:10 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81127 invoked by uid 500); 26 Feb 2004 14:18:09 -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 81037 invoked from network); 26 Feb 2004 14:18:08 -0000 Received: from unknown (HELO secure.exclamationlabs.net) (66.77.29.186) by daedalus.apache.org with SMTP; 26 Feb 2004 14:18:08 -0000 Received: from modperlcookbook.org (pcp05675728pcs.walngs01.pa.comcast.net [69.139.161.218]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id i1QEI8D23367 for ; Thu, 26 Feb 2004 08:18:09 -0600 Message-ID: <403E001A.6010605@modperlcookbook.org> Date: Thu, 26 Feb 2004 09:18:02 -0500 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: 1.x: byte-range with ErrorDocuments returns incorrect status code References: <20040225215745.GA15025@thebackrow.net> In-Reply-To: <20040225215745.GA15025@thebackrow.net> X-Enigmail-Version: 0.71.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------020602080709000604000504" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------020602080709000604000504 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Will Lowe wrote: > It looks like byte-range requests on non-existant files returns 206 > instead of 404 if ErrorDocument is set. I was able to verify this - it looks like there's some simple logic in 2.0 that wasn't carried over to 1.3. so, try this patch. all the byterange tests in the perl-framework pass with it, in addition to my own ErrorDocument tests that I used to reproduce the problem. if anyone on 1.3 support is paying attention, what's the proper course for insertion into the stable tree once things are verified - add to STATUS and wait for reviews/votes? --Geoff --------------020602080709000604000504 Content-Type: text/plain; name="byterange.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="byterange.patch" Index: src/main/http_protocol.c =================================================================== RCS file: /home/cvspublic/apache-1.3/src/main/http_protocol.c,v retrieving revision 1.332 diff -u -r1.332 http_protocol.c --- src/main/http_protocol.c 16 Feb 2004 22:29:33 -0000 1.332 +++ src/main/http_protocol.c 26 Feb 2004 14:14:21 -0000 @@ -260,7 +260,7 @@ if (!(range = ap_table_get(r->headers_in, "Range"))) range = ap_table_get(r->headers_in, "Request-Range"); - if (!range || strncasecmp(range, "bytes=", 6)) { + if (!range || strncasecmp(range, "bytes=", 6) || r->status != HTTP_OK) { return 0; } range += 6; --------------020602080709000604000504--