Mercurial > hg > nginx-mail
comparison src/http/ngx_http_core_module.c @ 2:cc9f381affaa NGINX_0_1_1
nginx 0.1.1
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 11 Oct 2004 00:00:00 +0400 |
parents | f0b350454894 |
children | 4b2dafa26fe2 |
comparison
equal
deleted
inserted
replaced
1:80bdda0151b0 | 2:cc9f381affaa |
---|---|
202 ngx_conf_set_flag_slot, | 202 ngx_conf_set_flag_slot, |
203 NGX_HTTP_LOC_CONF_OFFSET, | 203 NGX_HTTP_LOC_CONF_OFFSET, |
204 offsetof(ngx_http_core_loc_conf_t, tcp_nopush), | 204 offsetof(ngx_http_core_loc_conf_t, tcp_nopush), |
205 NULL }, | 205 NULL }, |
206 | 206 |
207 { ngx_string("tcp_nodelay"), | |
208 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
209 ngx_conf_set_flag_slot, | |
210 NGX_HTTP_LOC_CONF_OFFSET, | |
211 offsetof(ngx_http_core_loc_conf_t, tcp_nodelay), | |
212 NULL }, | |
213 | |
207 { ngx_string("send_timeout"), | 214 { ngx_string("send_timeout"), |
208 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, | 215 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, |
209 ngx_conf_set_msec_slot, | 216 ngx_conf_set_msec_slot, |
210 NGX_HTTP_LOC_CONF_OFFSET, | 217 NGX_HTTP_LOC_CONF_OFFSET, |
211 offsetof(ngx_http_core_loc_conf_t, send_timeout), | 218 offsetof(ngx_http_core_loc_conf_t, send_timeout), |
503 r->connection->log->file = clcf->err_log->file; | 510 r->connection->log->file = clcf->err_log->file; |
504 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { | 511 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { |
505 r->connection->log->log_level = clcf->err_log->log_level; | 512 r->connection->log->log_level = clcf->err_log->log_level; |
506 } | 513 } |
507 | 514 |
508 if (!(ngx_io.flags & NGX_IO_SENDFILE) || !clcf->sendfile) { | 515 if ((ngx_io.flags & NGX_IO_SENDFILE) && clcf->sendfile) { |
509 r->sendfile = 0; | 516 r->connection->sendfile = 1; |
510 | 517 |
511 } else { | 518 } else { |
512 r->sendfile = 1; | 519 r->connection->sendfile = 0; |
513 } | 520 } |
514 | 521 |
515 if (!clcf->tcp_nopush) { | 522 if (!clcf->tcp_nopush) { |
516 /* disable TCP_NOPUSH/TCP_CORK use */ | 523 /* disable TCP_NOPUSH/TCP_CORK use */ |
517 r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; | 524 r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; |
1385 lcf->client_max_body_size = NGX_CONF_UNSET_SIZE; | 1392 lcf->client_max_body_size = NGX_CONF_UNSET_SIZE; |
1386 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE; | 1393 lcf->client_body_buffer_size = NGX_CONF_UNSET_SIZE; |
1387 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC; | 1394 lcf->client_body_timeout = NGX_CONF_UNSET_MSEC; |
1388 lcf->sendfile = NGX_CONF_UNSET; | 1395 lcf->sendfile = NGX_CONF_UNSET; |
1389 lcf->tcp_nopush = NGX_CONF_UNSET; | 1396 lcf->tcp_nopush = NGX_CONF_UNSET; |
1397 lcf->tcp_nodelay = NGX_CONF_UNSET; | |
1390 lcf->send_timeout = NGX_CONF_UNSET_MSEC; | 1398 lcf->send_timeout = NGX_CONF_UNSET_MSEC; |
1391 lcf->send_lowat = NGX_CONF_UNSET_SIZE; | 1399 lcf->send_lowat = NGX_CONF_UNSET_SIZE; |
1392 lcf->postpone_output = NGX_CONF_UNSET_SIZE; | 1400 lcf->postpone_output = NGX_CONF_UNSET_SIZE; |
1393 lcf->limit_rate = NGX_CONF_UNSET_SIZE; | 1401 lcf->limit_rate = NGX_CONF_UNSET_SIZE; |
1394 lcf->keepalive_timeout = NGX_CONF_UNSET_MSEC; | 1402 lcf->keepalive_timeout = NGX_CONF_UNSET_MSEC; |
1475 (size_t) 2 * ngx_pagesize); | 1483 (size_t) 2 * ngx_pagesize); |
1476 ngx_conf_merge_msec_value(conf->client_body_timeout, | 1484 ngx_conf_merge_msec_value(conf->client_body_timeout, |
1477 prev->client_body_timeout, 60000); | 1485 prev->client_body_timeout, 60000); |
1478 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); | 1486 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); |
1479 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); | 1487 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); |
1488 ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 0); | |
1480 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); | 1489 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); |
1481 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); | 1490 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); |
1482 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, | 1491 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, |
1483 1460); | 1492 1460); |
1484 ngx_conf_merge_size_value(conf->limit_rate, prev->limit_rate, 0); | 1493 ngx_conf_merge_size_value(conf->limit_rate, prev->limit_rate, 0); |
1793 } | 1802 } |
1794 | 1803 |
1795 | 1804 |
1796 static char *ngx_http_lowat_check(ngx_conf_t *cf, void *post, void *data) | 1805 static char *ngx_http_lowat_check(ngx_conf_t *cf, void *post, void *data) |
1797 { | 1806 { |
1798 #if (HAVE_LOWAT_EVENT) | |
1799 | |
1800 ssize_t *np = data; | 1807 ssize_t *np = data; |
1808 | |
1809 #if __FreeBSD__ | |
1801 | 1810 |
1802 if (*np >= ngx_freebsd_net_inet_tcp_sendspace) { | 1811 if (*np >= ngx_freebsd_net_inet_tcp_sendspace) { |
1803 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1812 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1804 "\"send_lowat\" must be less than %d " | 1813 "\"send_lowat\" must be less than %d " |
1805 "(sysctl net.inet.tcp.sendspace)", | 1814 "(sysctl net.inet.tcp.sendspace)", |
1806 ngx_freebsd_net_inet_tcp_sendspace); | 1815 ngx_freebsd_net_inet_tcp_sendspace); |
1807 | 1816 |
1808 return NGX_CONF_ERROR; | 1817 return NGX_CONF_ERROR; |
1809 } | 1818 } |
1810 | 1819 |
1811 #else | 1820 #elif !(HAVE_SO_SNDLOWAT) |
1812 | 1821 |
1813 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 1822 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, |
1814 "\"send_lowat\" is not supported, ignored"); | 1823 "\"send_lowat\" is not supported, ignored"); |
1815 | 1824 |
1825 *np = 0; | |
1826 | |
1816 #endif | 1827 #endif |
1817 | 1828 |
1818 return NGX_CONF_OK; | 1829 return NGX_CONF_OK; |
1819 } | 1830 } |