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
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;