From: Ruediger Pluem Date: Thu, 5 Jan 2006 20:56:43 +0000 (+0000) Subject: * Fix a regression from 2.2.x: Set c->aborted to 1 if the return code from X-Git-Tag: 2.3.0~2635 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=150b795c748e88c4ea955d004363c36c38147371;p=apache * Fix a regression from 2.2.x: Set c->aborted to 1 if the return code from writing to the client is different from APR_SUCCESS in the blocking case or APR_SUCCESS or APR_EAGAIN in the non blocking case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@366278 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core_filters.c b/server/core_filters.c index 5f6ff31ec4..c1ed5464d4 100644 --- a/server/core_filters.c +++ b/server/core_filters.c @@ -416,6 +416,10 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb) if (APR_STATUS_IS_EAGAIN(rv)) { rv = APR_SUCCESS; } + else if (rv != APR_SUCCESS) { + /* The client has aborted the connection */ + c->aborted = 1; + } setaside_remaining_output(f, ctx, bb, 0, c); return rv; } @@ -430,6 +434,8 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb) apr_status_t rv = send_brigade_blocking(net->client_socket, bb, &(ctx->bytes_written), c); if (rv != APR_SUCCESS) { + /* The client has aborted the connection */ + c->aborted = 1; return rv; } bb = remainder; @@ -464,6 +470,8 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb) apr_status_t rv = send_brigade_blocking(net->client_socket, bb, &(ctx->bytes_written), c); if (rv != APR_SUCCESS) { + /* The client has aborted the connection */ + c->aborted = 1; return rv; } } @@ -471,6 +479,8 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb) apr_status_t rv = send_brigade_nonblocking(net->client_socket, bb, &(ctx->bytes_written), c); if ((rv != APR_SUCCESS) && (!APR_STATUS_IS_EAGAIN(rv))) { + /* The client has aborted the connection */ + c->aborted = 1; return rv; } }