From c8caf9a508aa7345cd76bb80370bbd900a00a7d1 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Sun, 28 Jan 2001 03:38:21 +0000 Subject: [PATCH] Use the new error bucket to report HTTP_RANGE_NOT_SATISFIABLE from the byterange filter. This is much safer than returning the error directly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87884 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_protocol.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 2317a56b46..b66254bccc 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -235,7 +235,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter( if (num_ranges == -1) { ap_remove_output_filter(f); - return HTTP_RANGE_NOT_SATISFIABLE; + bsend = apr_brigade_create(r->pool); + e = ap_bucket_create_error(HTTP_RANGE_NOT_SATISFIABLE, NULL, r->pool); + APR_BRIGADE_INSERT_TAIL(bsend, e); + e = apr_bucket_create_eos(); + APR_BRIGADE_INSERT_TAIL(bsend, e); + return ap_pass_brigade(f->next, bsend); } if (num_ranges == 0) { ap_remove_output_filter(f); -- 2.40.0