Commit ea06495e authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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
parent 701665c7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);