httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r366278 - /httpd/httpd/trunk/server/core_filters.c
Date Thu, 05 Jan 2006 20:56:46 GMT
Author: rpluem
Date: Thu Jan  5 12:56:43 2006
New Revision: 366278

URL: http://svn.apache.org/viewcvs?rev=366278&view=rev
Log:
* 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.

Modified:
    httpd/httpd/trunk/server/core_filters.c

Modified: httpd/httpd/trunk/server/core_filters.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/core_filters.c?rev=366278&r1=366277&r2=366278&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c (original)
+++ httpd/httpd/trunk/server/core_filters.c Thu Jan  5 12:56:43 2006
@@ -416,6 +416,10 @@
         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 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 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 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;
         }
     }



Mime
View raw message