| 208 | |
| 209 | #if defined(TCP_NODELAY) |
| 210 | void ap_sock_disable_nagle(apr_socket_t *s) |
| 211 | { |
| 212 | /* The Nagle algorithm says that we should delay sending partial |
| 213 | * packets in hopes of getting more data. We don't want to do |
| 214 | * this; we are not telnet. There are bad interactions between |
| 215 | * persistent connections and Nagle's algorithm that have very severe |
| 216 | * performance penalties. (Failing to disable Nagle is not much of a |
| 217 | * problem with simple HTTP.) |
| 218 | * |
| 219 | * In spite of these problems, failure here is not a shooting offense. |
| 220 | */ |
| 221 | apr_status_t status = apr_socket_opt_set(s, APR_TCP_NODELAY, 1); |
| 222 | |
| 223 | if (status != APR_SUCCESS) { |
| 224 | ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf, APLOGNO(00542) |
| 225 | "apr_socket_opt_set: (TCP_NODELAY)"); |
| 226 | } |
| 227 | } |
| 228 | #endif |
| 229 | |
| 230 | #ifdef HAVE_GETPWNAM |
no test coverage detected