View | Details | Raw Unified | Return to bug 62180
Collapse All | Expand All

(-)modules/filters/mod_xml2enc.c (-10 / +7 lines)
Lines 399-413 static apr_status_t xml2enc_ffunc(ap_filter_t* f, Link Here
399
    while (b = APR_BRIGADE_FIRST(bb), b != APR_BRIGADE_SENTINEL(bb)) {
399
    while (b = APR_BRIGADE_FIRST(bb), b != APR_BRIGADE_SENTINEL(bb)) {
400
        ctx->bytes = 0;
400
        ctx->bytes = 0;
401
        if (APR_BUCKET_IS_METADATA(b)) {
401
        if (APR_BUCKET_IS_METADATA(b)) {
402
            /* passing meta bucket down the chain */
402
            APR_BUCKET_REMOVE(b);
403
            APR_BUCKET_REMOVE(b);
404
            APR_BRIGADE_INSERT_TAIL(ctx->bbnext, b);
403
            if (APR_BUCKET_IS_EOS(b)) {
405
            if (APR_BUCKET_IS_EOS(b)) {
404
                /* send remaining data */
406
                ap_remove_output_filter(f);
405
                APR_BRIGADE_INSERT_TAIL(ctx->bbnext, b);
406
                return ap_fflush(f->next, ctx->bbnext);
407
            } else if (APR_BUCKET_IS_FLUSH(b)) {
408
                ap_fflush(f->next, ctx->bbnext);
409
            }
407
            }
410
            apr_bucket_destroy(b);
408
            rv = ap_pass_brigade(f->next, ctx->bbnext);
409
            apr_brigade_cleanup(ctx->bbnext);
411
        }
410
        }
412
        else {        /* data bucket */
411
        else {        /* data bucket */
413
            char* buf;
412
            char* buf;
Lines 514-521 static apr_status_t xml2enc_ffunc(ap_filter_t* f, Link Here
514
                        if (rv != APR_SUCCESS)
513
                        if (rv != APR_SUCCESS)
515
                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r, APLOGNO(01446)
514
                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r, APLOGNO(01446)
516
                                          "ap_fflush failed");
515
                                          "ap_fflush failed");
517
                        else
518
                            rv = ap_pass_brigade(f->next, ctx->bbnext);
519
                    }
516
                    }
520
                }
517
                }
521
            } else {
518
            } else {
Lines 524-532 static apr_status_t xml2enc_ffunc(ap_filter_t* f, Link Here
524
            }
521
            }
525
            if (bdestroy)
522
            if (bdestroy)
526
                apr_bucket_destroy(bdestroy);
523
                apr_bucket_destroy(bdestroy);
527
            if (rv != APR_SUCCESS)
528
                return rv;
529
        }
524
        }
525
        if (rv != APR_SUCCESS)
526
            return rv;
530
    }
527
    }
531
    return APR_SUCCESS;
528
    return APR_SUCCESS;
532
}
529
}

Return to bug 62180