From 73b9f5c49729da3a2690d25f6db758f6cbb70998 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 29 Mar 2004 18:23:03 +0000 Subject: [PATCH] Backport fix for ap_set_byterange() which correctly handles ErrorDocument PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@103194 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 8 +------- src/main/http_protocol.c | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/STATUS b/STATUS index e33f77af944..22e0eb4f6c8 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 1.3 STATUS: -*-text-*- - Last modified at [$Date: 2004/03/29 18:18:00 $] + Last modified at [$Date: 2004/03/29 18:23:03 $] Release: @@ -60,12 +60,6 @@ RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP: http://www.apache.org/~trawick/13_custom_response_patch +1: trawick, stoddard - * byterange requests with configured ErrorDocuments return 206 instead - of the error code like with 2.0. looks like some 2.0 logic needs to - backported. - http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=107780510031395&w=2 - +1: geoff - * isn't ap_die() broken with recognizing recursive errors Message-Id: <3F8C56E3.8050501@attglobal.net> +1: jeff, jim diff --git a/src/main/http_protocol.c b/src/main/http_protocol.c index 61415926083..c516f73918c 100644 --- a/src/main/http_protocol.c +++ b/src/main/http_protocol.c @@ -260,7 +260,7 @@ API_EXPORT(int) ap_set_byterange(request_rec *r) 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; -- 2.47.2