From 2b98711d88c78d12bb02899b625ff5b9aaf5f211 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Thu, 8 Sep 2011 13:02:47 +0000 Subject: [PATCH] Set Accept-Rangs: none instead of unsetting the Accept-Range header when we have a filter that doesn't like byteranges. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166667 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/filters/mod_filter.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index a79db2f8c2..f43a3cb725 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,10 @@ Changes with Apache 2.3.15 the original file, ignore the ranges and send the complete file. PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener] + *) mod_filter: Instead of dropping the Accept-Ranges header when a filter + registered with AP_FILTER_PROTO_NO_BYTERANGE is present, + set the header value to "none". [Eric Covener, Ruediger Pluem] + *) core: Allow MaxRanges none|unlimited|default and set 'Accept-Ranges: none' in the case Ranges are being ignored with MaxRanges none. [Eric Covener] diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index 8dbbf8cb3c..f1abfefe13 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -212,7 +212,7 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter) } if (proto_flags & AP_FILTER_PROTO_NO_BYTERANGE) { - apr_table_unset(r->headers_out, "Accept-Ranges"); + apr_table_setn(r->headers_out, "Accept-Ranges", "none"); } else if (rctx && rctx->range) { /* restore range header we saved earlier */ -- 2.40.0