]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Actually, we should always close the connection when it is finished.
authorBen Laurie <ben@apache.org>
Fri, 23 Jul 1999 18:14:44 +0000 (18:14 +0000)
committerBen Laurie <ben@apache.org>
Fri, 23 Jul 1999 18:14:44 +0000 (18:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83488 13f79535-47bb-0310-9956-ffa450edef68

server/connection.c

index 3c81e12eb05aad382c487903ace50c538346cd3e..c4cff197125daae29acfb7fe2d2ecfcc2666ca7a 100644 (file)
@@ -197,6 +197,28 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
     ap_run_pre_connection(c);
 
     ap_run_process_connection(c);
+
+    /*
+     * Close the connection, being careful to send out whatever is still
+     * in our buffers.  If possible, try to avoid a hard close until the
+     * client has ACKed our FIN and/or has stopped sending us data.
+     */
+
+#ifdef NO_LINGCLOSE
+    ap_bclose(c->client);      /* just close it */
+#else
+    if (r && r->connection
+       && !r->connection->aborted
+       && r->connection->client
+       && (r->connection->client->fd >= 0)) {
+
+       lingering_close(r);
+    }
+    else {
+       ap_bsetflag(c->client, B_EOUT, 1);
+       ap_bclose(c->client);
+    }
+#endif
 }
 
 int ap_process_http_connection(conn_rec *c)
@@ -227,28 +249,6 @@ int ap_process_http_connection(conn_rec *c)
        }
     }
 
-    /*
-     * Close the connection, being careful to send out whatever is still
-     * in our buffers.  If possible, try to avoid a hard close until the
-     * client has ACKed our FIN and/or has stopped sending us data.
-     */
-
-#ifdef NO_LINGCLOSE
-    ap_bclose(c->client);      /* just close it */
-#else
-    if (r && r->connection
-       && !r->connection->aborted
-       && r->connection->client
-       && (r->connection->client->fd >= 0)) {
-
-       lingering_close(r);
-    }
-    else {
-       ap_bsetflag(c->client, B_EOUT, 1);
-       ap_bclose(c->client);
-    }
-#endif
-
     return OK;
 }