comparison src/http/ngx_http_request.c @ 22:8b6db3bda591 NGINX_0_1_11

nginx 0.1.11 *) Feature: the worker_priority directive. *) Change: both tcp_nopush and tcp_nodelay directives affect the transferred response. *) Bugfix: nginx did not call initgroups(). Thanks to Andrew Sitnikov and Andrei Nigmatulin. *) Change: now the ngx_http_autoindex_module shows the file size in the bytes. *) Bugfix: the ngx_http_autoindex_module returned the 500 error if the broken symlink was in a directory. *) Bugfix: the files bigger than 4G could not be transferred using sendfile. *) Bugfix: if the backend was resolved to several backends and there was an error while the response waiting then process may got caught in an endless loop. *) Bugfix: the worker process may exit with the "unknown cycle" message when the /dev/poll method was used. *) Bugfix: "close() channel failed" errors. *) Bugfix: the autodetection of the "nobody" and "nogroup" groups. *) Bugfix: the send_lowat directive did not work on Linux. *) Bugfix: the segmentation fault occurred if there was no events section in configuration. *) Bugfix: nginx could not be built on OpenBSD. *) Bugfix: the double slashes in "://" in the URI were converted to ":/".
author Igor Sysoev <http://sysoev.ru>
date Thu, 02 Dec 2004 00:00:00 +0300
parents 6f8b0dc0f8dd
children 420dd3f9e703
comparison
equal deleted inserted replaced
21:4eeb9cfef970 22:8b6db3bda591
1188 r->headers_in.msie4 = 1; 1188 r->headers_in.msie4 = 1;
1189 } 1189 }
1190 1190
1191 #if 0 1191 #if 0
1192 /* MSIE ignores the SSL "close notify" alert */ 1192 /* MSIE ignores the SSL "close notify" alert */
1193 1193 if (c->ssl) {
1194 ngx_ssl_set_nosendshut(r->connection->ssl); 1194 r->connection->ssl->no_send_shut = 1;
1195 }
1195 #endif 1196 #endif
1196 } 1197 }
1197 1198
1198 if (ngx_strstr(user_agent, "Opera")) { 1199 if (ngx_strstr(user_agent, "Opera")) {
1199 r->headers_in.opera = 1; 1200 r->headers_in.opera = 1;
1267 r->connection->write->delayed = 0; 1268 r->connection->write->delayed = 0;
1268 ngx_del_timer(r->connection->write); 1269 ngx_del_timer(r->connection->write);
1269 } 1270 }
1270 1271
1271 if (r->connection->read->pending_eof) { 1272 if (r->connection->read->pending_eof) {
1272 #if (NGX_KQUEUE) 1273 #if (NGX_HAVE_KQUEUE)
1273 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 1274 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log,
1274 r->connection->read->kq_errno, 1275 r->connection->read->kq_errno,
1275 "kevent() reported about an closed connection"); 1276 "kevent() reported about an closed connection");
1276 #endif 1277 #endif
1277 ngx_http_close_request(r, 0); 1278 ngx_http_close_request(r, 0);
1700 ngx_http_close_connection(c); 1701 ngx_http_close_connection(c);
1701 return; 1702 return;
1702 } 1703 }
1703 1704
1704 c->tcp_nopush = NGX_TCP_NOPUSH_UNSET; 1705 c->tcp_nopush = NGX_TCP_NOPUSH_UNSET;
1706 tcp_nodelay = ngx_tcp_nodelay_and_tcp_nopush ? 1 : 0;
1705 1707
1706 } else { 1708 } else {
1707 if (clcf->tcp_nodelay && !c->tcp_nodelay) { 1709 tcp_nodelay = 1;
1708 tcp_nodelay = 1; 1710 }
1709 1711
1710 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay"); 1712 if (tcp_nodelay && clcf->tcp_nodelay && !c->tcp_nodelay) {
1711 1713
1712 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, 1714 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "tcp_nodelay");
1713 (const void *) &tcp_nodelay, sizeof(int)) == -1) 1715
1714 { 1716 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
1715 ngx_connection_error(c, ngx_socket_errno, 1717 (const void *) &tcp_nodelay, sizeof(int)) == -1)
1716 "setsockopt(TCP_NODELAY) failed"); 1718 {
1717 ngx_http_close_connection(c); 1719 ngx_connection_error(c, ngx_socket_errno,
1718 return; 1720 "setsockopt(TCP_NODELAY) failed");
1719 } 1721 ngx_http_close_connection(c);
1720 1722 return;
1721 c->tcp_nodelay = 1; 1723 }
1722 } 1724
1725 c->tcp_nodelay = 1;
1723 } 1726 }
1724 1727
1725 #if 0 1728 #if 0
1726 /* if ngx_http_request_t was freed then we need some other place */ 1729 /* if ngx_http_request_t was freed then we need some other place */
1727 r->http_state = NGX_HTTP_KEEPALIVE_STATE; 1730 r->http_state = NGX_HTTP_KEEPALIVE_STATE;
1759 if (rev->pending_eof) { 1762 if (rev->pending_eof) {
1760 rev->log->handler = NULL; 1763 rev->log->handler = NULL;
1761 ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno, 1764 ngx_log_error(NGX_LOG_INFO, c->log, rev->kq_errno,
1762 "kevent() reported that client %V closed " 1765 "kevent() reported that client %V closed "
1763 "keepalive connection", ctx->client); 1766 "keepalive connection", ctx->client);
1767 #if (NGX_HTTP_SSL)
1768 if (c->ssl) {
1769 c->ssl->no_send_shut = 1;
1770 }
1771 #endif
1764 ngx_http_close_connection(c); 1772 ngx_http_close_connection(c);
1765 return; 1773 return;
1766 } 1774 }
1767 } 1775 }
1768 1776