]> granicus.if.org Git - apache/blobdiff - modules/http/byterange_filter.c
Make sure to not destroy bucket brigades that have been created by earlier
[apache] / modules / http / byterange_filter.c
index a25d1e5957d8a96c2fc4c2c4e0ecc8d4d1ef40b0..92048ab75d75f5d3cf6a544609de35ab0806f031 100644 (file)
@@ -29,7 +29,6 @@
 #define APR_WANT_MEMFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "util_filter.h"
 #include "ap_config.h"
 #include "httpd.h"
@@ -193,7 +192,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
                                            "byteranges; boundary=",
                                            ctx->boundary, NULL));
 
-        if (strcasecmp(orig_ct, NO_CONTENT_TYPE)) {
+        if (orig_ct) {
             ctx->bound_head = apr_pstrcat(r->pool,
                                           CRLF "--", ctx->boundary,
                                           CRLF "Content-type: ",
@@ -308,7 +307,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
     APR_BRIGADE_INSERT_TAIL(bsend, e);
 
     /* we're done with the original content - all of our data is in bsend. */
-    apr_brigade_destroy(bb);
+    apr_brigade_cleanup(bb);
 
     /* send our multipart output */
     return ap_pass_brigade(f->next, bsend);