1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00

Change core connection handling so that a connection-oriented

error disabling nagle* is logged with the client IP address and
a debug log level.  We filter out not-implemented errors from
platforms which don't support TCP_NODELAY.

*This is typically EINVAL, which means that the client already
dropped the connection.

Also, mention an earlier change to include the client IP address
when logging connection-oriented errors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2004-11-01 13:06:51 +00:00
parent 7788f37e0b
commit 43eb49ae9d
2 changed files with 22 additions and 1 deletions

View File

@@ -4544,6 +4544,7 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
static int core_pre_connection(conn_rec *c, void *csd)
{
core_net_rec *net = apr_palloc(c->pool, sizeof(*net));
apr_status_t rv;
#ifdef AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
/* BillS says perhaps this should be moved to the MPMs. Some OSes
@@ -4551,7 +4552,21 @@ static int core_pre_connection(conn_rec *c, void *csd)
* accept sockets which means this call only needs to be made
* once on the listener
*/
ap_sock_disable_nagle(csd);
/* The Nagle algorithm says that we should delay sending partial
* packets in hopes of getting more data. We don't want to do
* this; we are not telnet. There are bad interactions between
* persistent connections and Nagle's algorithm that have very severe
* performance penalties. (Failing to disable Nagle is not much of a
* problem with simple HTTP.)
*/
rv = apr_socket_opt_set(csd, APR_TCP_NODELAY, 1);
if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
/* expected cause is that the client disconnected already,
* hence the debug level
*/
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
"apr_socket_opt_set(APR_TCP_NODELAY)");
}
#endif
net->c = c;
net->in_ctx = NULL;