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

(-)modules/http/http_filters.c (-3 / +20 lines)
Lines 352-357 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
352
                return APR_EAGAIN;
352
                return APR_EAGAIN;
353
            }
353
            }
354
354
355
            if (rv == APR_EOF) {
356
                return APR_ECONNABORTED;
357
            }
358
355
            if (rv != APR_SUCCESS) {
359
            if (rv != APR_SUCCESS) {
356
                return rv;
360
                return rv;
357
            }
361
            }
Lines 377-384 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
377
381
378
                apr_bucket_delete(e);
382
                apr_bucket_delete(e);
379
                e = APR_BRIGADE_FIRST(b);
383
                e = APR_BRIGADE_FIRST(b);
380
                again = 1; /* come around again */
381
            }
384
            }
385
            again = 1; /* come around again */
382
386
383
            if (ctx->state == BODY_CHUNK_TRAILER) {
387
            if (ctx->state == BODY_CHUNK_TRAILER) {
384
                ap_get_mime_headers(f->r);
388
                ap_get_mime_headers(f->r);
Lines 409-414 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
409
                    return APR_EAGAIN;
413
                    return APR_EAGAIN;
410
                }
414
                }
411
415
416
                if (rv == APR_EOF && ctx->state != BODY_NONE
417
                        && ctx->remaining > 0) {
418
                    return APR_ECONNABORTED;
419
                }
420
412
                if (rv != APR_SUCCESS) {
421
                if (rv != APR_SUCCESS) {
413
                    return rv;
422
                    return rv;
414
                }
423
                }
Lines 425-431 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
425
                    if (ctx->remaining > 0) {
434
                    if (ctx->remaining > 0) {
426
                        e = APR_BRIGADE_LAST(b);
435
                        e = APR_BRIGADE_LAST(b);
427
                        if (APR_BUCKET_IS_EOS(e)) {
436
                        if (APR_BUCKET_IS_EOS(e)) {
428
                            return APR_EOF;
437
                            apr_bucket_delete(e);
438
                            return APR_ECONNABORTED;
429
                        }
439
                        }
430
                    }
440
                    }
431
                    else if (ctx->state == BODY_CHUNK_DATA) {
441
                    else if (ctx->state == BODY_CHUNK_DATA) {
Lines 473-478 apr_status_t ap_http_filter(ap_filter_t *f, apr_bu Link Here
473
                return APR_EAGAIN;
483
                return APR_EAGAIN;
474
            }
484
            }
475
485
486
            if (rv == APR_EOF) {
487
                return APR_ECONNABORTED;
488
            }
489
476
            if (rv != APR_SUCCESS) {
490
            if (rv != APR_SUCCESS) {
477
                return rv;
491
                return rv;
478
            }
492
            }
Lines 1610-1618 apr_status_t ap_http_outerror_filter(ap_filter_t * Link Here
1610
             * Start of error handling state tree. Just one condition
1624
             * Start of error handling state tree. Just one condition
1611
             * right now :)
1625
             * right now :)
1612
             */
1626
             */
1613
            if (((ap_bucket_error *)(e->data))->status == HTTP_BAD_GATEWAY) {
1627
            switch (((ap_bucket_error *)(e->data))->status) {
1628
            case HTTP_BAD_GATEWAY:
1629
            case HTTP_GATEWAY_TIME_OUT:
1614
                /* stream aborted and we have not ended it yet */
1630
                /* stream aborted and we have not ended it yet */
1615
                r->connection->keepalive = AP_CONN_CLOSE;
1631
                r->connection->keepalive = AP_CONN_CLOSE;
1632
                break;
1616
            }
1633
            }
1617
            continue;
1634
            continue;
1618
        }
1635
        }
(-)modules/http/chunk_filter.c (-9 / +11 lines)
Lines 72-86 apr_status_t ap_http_chunk_filter(ap_filter_t *f, Link Here
72
                eos = e;
72
                eos = e;
73
                break;
73
                break;
74
            }
74
            }
75
            if (AP_BUCKET_IS_ERROR(e)
75
            if (AP_BUCKET_IS_ERROR(e)) {
76
                && (((ap_bucket_error *)(e->data))->status
76
                switch (((ap_bucket_error *)(e->data))->status) {
77
                    == HTTP_BAD_GATEWAY)) {
77
                case HTTP_BAD_GATEWAY:
78
                /*
78
                case HTTP_GATEWAY_TIME_OUT:
79
                 * We had a broken backend. Memorize this in the filter
79
                    /*
80
                 * context.
80
                     * We had a broken backend. Memorize this in the filter
81
                 */
81
                     * context.
82
                f->ctx = &bad_gateway_seen;
82
                     */
83
                continue;
83
                    f->ctx = &bad_gateway_seen;
84
                    continue;
85
                }
84
            }
86
            }
85
            if (APR_BUCKET_IS_FLUSH(e)) {
87
            if (APR_BUCKET_IS_FLUSH(e)) {
86
                flush = e;
88
                flush = e;

Return to bug 55475