Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 605:5dac8c7fb71b release-0.3.24
nginx-0.3.24-RELEASE import
*) Workaround: for bug in FreeBSD kqueue.
*) Bugfix: now a response generated by the "post_action" directive is
not transferred to a client.
*) Bugfix: the memory leaks were occurring if many log files were used.
*) Bugfix: the first "proxy_redirect" directive was working inside one
location.
*) Bugfix: on 64-bit platforms segmentation fault may occurred on start
if the many names were used in the "server_name" directives; the bug
had appeared in 0.3.18.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 01 Feb 2006 18:22:15 +0000 |
parents | 858700ae46b4 |
children | 608cf78b24ef |
comparison
equal
deleted
inserted
replaced
604:f4a6e8f250a8 | 605:5dac8c7fb71b |
---|---|
1878 ls->conf.backlog = -1; | 1878 ls->conf.backlog = -1; |
1879 ls->conf.rcvbuf = -1; | 1879 ls->conf.rcvbuf = -1; |
1880 ls->conf.sndbuf = -1; | 1880 ls->conf.sndbuf = -1; |
1881 } | 1881 } |
1882 | 1882 |
1883 if (conf->server_names.nelts == 0) { | 1883 if (conf->server_name.data == NULL) { |
1884 conf->server_name.data = ngx_palloc(cf->pool, NGX_MAXHOSTNAMELEN); | |
1885 if (conf->server_name.data == NULL) { | |
1886 return NGX_CONF_ERROR; | |
1887 } | |
1888 | |
1889 if (gethostname((char *) conf->server_name.data, NGX_MAXHOSTNAMELEN) | |
1890 == -1) | |
1891 { | |
1892 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | |
1893 "gethostname() failed"); | |
1894 return NGX_CONF_ERROR; | |
1895 } | |
1896 | |
1897 conf->server_name.len = ngx_strlen(conf->server_name.data); | |
1898 | |
1884 sn = ngx_array_push(&conf->server_names); | 1899 sn = ngx_array_push(&conf->server_names); |
1885 if (sn == NULL) { | 1900 if (sn == NULL) { |
1886 return NGX_CONF_ERROR; | 1901 return NGX_CONF_ERROR; |
1887 } | 1902 } |
1888 | 1903 |
1889 sn->name.data = ngx_palloc(cf->pool, NGX_MAXHOSTNAMELEN); | 1904 sn->name.len = conf->server_name.len; |
1890 if (sn->name.data == NULL) { | 1905 sn->name.data = conf->server_name.data; |
1891 return NGX_CONF_ERROR; | |
1892 } | |
1893 | |
1894 if (gethostname((char *) sn->name.data, NGX_MAXHOSTNAMELEN) == -1) { | |
1895 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | |
1896 "gethostname() failed"); | |
1897 return NGX_CONF_ERROR; | |
1898 } | |
1899 | |
1900 sn->name.len = ngx_strlen(sn->name.data); | |
1901 sn->core_srv_conf = conf; | 1906 sn->core_srv_conf = conf; |
1902 } | 1907 } |
1903 | 1908 |
1904 ngx_conf_merge_size_value(conf->connection_pool_size, | 1909 ngx_conf_merge_size_value(conf->connection_pool_size, |
1905 prev->connection_pool_size, 256); | 1910 prev->connection_pool_size, 256); |