]> granicus.if.org Git - apache/commitdiff
* Fix a regression from 2.2.x: Set c->aborted to 1 if the return code from
authorRuediger Pluem <rpluem@apache.org>
Thu, 5 Jan 2006 20:56:43 +0000 (20:56 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 5 Jan 2006 20:56:43 +0000 (20:56 +0000)
  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

server/core_filters.c

index 5f6ff31ec48bdbfcecb83b066a8811e1d1ff82bb..c1ed5464d4627c4325efcbc55c37199d11ba9f4f 100644 (file)
@@ -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;
         }
     }