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 |
} |