]> granicus.if.org Git - apache/commitdiff
Use the new error bucket to report HTTP_RANGE_NOT_SATISFIABLE from
authorRyan Bloom <rbb@apache.org>
Sun, 28 Jan 2001 03:38:21 +0000 (03:38 +0000)
committerRyan Bloom <rbb@apache.org>
Sun, 28 Jan 2001 03:38:21 +0000 (03:38 +0000)
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

index 2317a56b46d6958f0434c4aa5c7d082f6bbf659a..b66254bcccc61555231bdef03a51a0c0683f4252 100644 (file)
@@ -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);