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

(-)modules/http/http_filters.c (-4 / +10 lines)
Lines 440-445 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
440
                    }
440
                    }
441
                    /* If we get an error, then leave */
441
                    /* If we get an error, then leave */
442
                    if (rv != APR_SUCCESS) {
442
                    if (rv != APR_SUCCESS) {
443
                        if (rv == APR_EOF) {
444
                            return APR_INCOMPLETE;
445
                        }
443
                        return rv;
446
                        return rv;
444
                    }
447
                    }
445
                    /*
448
                    /*
Lines 525-530 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
525
    rv = ap_get_brigade(f->next, b, mode, block, readbytes);
528
    rv = ap_get_brigade(f->next, b, mode, block, readbytes);
526
529
527
    if (rv != APR_SUCCESS) {
530
    if (rv != APR_SUCCESS) {
531
        if (rv == APR_EOF && ctx->remaining > 0 &&
532
                ctx->state != BODY_NONE) {
533
            return APR_INCOMPLETE;
534
        }
528
        return rv;
535
        return rv;
529
    }
536
    }
530
537
Lines 537-546 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
537
544
538
    if (ctx->state != BODY_NONE) {
545
    if (ctx->state != BODY_NONE) {
539
        ctx->remaining -= totalread;
546
        ctx->remaining -= totalread;
540
        if (ctx->remaining > 0) {
547
        if (ctx->remaining > 0 && !APR_BRIGADE_EMPTY(b) &&
541
            e = APR_BRIGADE_LAST(b);
548
                APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(b))) {
542
            if (APR_BUCKET_IS_EOS(e))
549
            return APR_INCOMPLETE;
543
                return APR_EOF;
544
        }
550
        }
545
    }
551
    }
546
552

Return to bug 55475