diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-10-19 16:33:58 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-10-19 16:33:58 +0400 |
commit | c2068d08f097383b8eac508117e6d405627e6cef (patch) | |
tree | 06ca21df58481e97289a566f42703102c0b6583c /src/http/ngx_http_core_module.c | |
parent | 8743f92a1acd46c0a4b0df2bf6a80fc1b110affb (diff) |
nginx-0.3.3-RELEASE importrelease-0.3.3
*) Change: the "bl" and "af" parameters of the "listen" directive was
renamed to the "backlog" and "accept_filter".
*) Feature: the "rcvbuf" and "sndbuf" parameters of the "listen"
directive.
*) Change: the "$msec" log parameter does not require now the
additional the gettimeofday() system call.
*) Feature: the -t switch now tests the "listen" directives.
*) Bugfix: if the invalid address was specified in the "listen"
directive, then after the -HUP signal nginx left an open socket in
the CLOSED state.
*) Bugfix: the mime type may be incorrectly set to default value for
index file with variable in the name; the bug had appeared in 0.3.0.
*) Feature: the "timer_resolution" directive.
*) Feature: the millisecond "$upstream_response_time" log parameter.
*) Bugfix: a temporary file with client request body now is removed
just after the response header was transferred to a client.
*) Bugfix: OpenSSL 0.9.6 compatibility.
*) Bugfix: the SSL certificate and key file paths could not be relative.
*) Bugfix: the "ssl_prefer_server_ciphers" directive did not work in
the ngx_imap_ssl_module.
*) Bugfix: the "ssl_protocols" directive allowed to specify the single
protocol only.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 4c6cfc073..21224d389 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -152,11 +152,7 @@ static ngx_command_t ngx_http_core_commands[] = { NULL }, { ngx_string("listen"), -#if 0 - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_1MORE, -#else NGX_HTTP_SRV_CONF|NGX_CONF_1MORE, -#endif ngx_http_core_listen, NGX_HTTP_SRV_CONF_OFFSET, 0, @@ -2010,7 +2006,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_http_core_srv_conf_t *scf = conf; char *err; - ngx_str_t *value; + ngx_str_t *value, size; ngx_uint_t n; struct hostent *h; ngx_http_listen_t *ls; @@ -2050,6 +2046,8 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ls->file_name = cf->conf_file->file.name; ls->line = cf->conf_file->line; ls->conf.backlog = -1; + ls->conf.rcvbuf = -1; + ls->conf.sndbuf = -1; if (inet_upstream.host.len) { inet_upstream.host.data[inet_upstream.host.len] = '\0'; @@ -2100,8 +2098,8 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) continue; } - if (ngx_strncmp(value[n].data, "bl=", 3) == 0) { - ls->conf.backlog = ngx_atoi(value[n].data + 3, value[n].len - 3); + if (ngx_strncmp(value[n].data, "backlog=", 8) == 0) { + ls->conf.backlog = ngx_atoi(value[n].data + 8, value[n].len - 8); ls->conf.bind = 1; if (ls->conf.backlog == NGX_ERROR || ls->conf.backlog == 0) { @@ -2113,9 +2111,41 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) continue; } - if (ngx_strncmp(value[n].data, "af=", 3) == 0) { + if (ngx_strncmp(value[n].data, "rcvbuf=", 7) == 0) { + size.len = value[n].len - 7; + size.data = value[n].data + 7; + + ls->conf.rcvbuf = ngx_parse_size(&size); + ls->conf.bind = 1; + + if (ls->conf.rcvbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid rcvbuf \"%V\"", &value[n]); + return NGX_CONF_ERROR; + } + + continue; + } + + if (ngx_strncmp(value[n].data, "sndbuf=", 7) == 0) { + size.len = value[n].len - 7; + size.data = value[n].data + 7; + + ls->conf.sndbuf = ngx_parse_size(&size); + ls->conf.bind = 1; + + if (ls->conf.sndbuf == NGX_ERROR) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "invalid sndbuf \"%V\"", &value[n]); + return NGX_CONF_ERROR; + } + + continue; + } + + if (ngx_strncmp(value[n].data, "accept_filter=", 14) == 0) { #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) - ls->conf.accept_filter = (char *) &value[n].data[3]; + ls->conf.accept_filter = (char *) &value[n].data[14]; ls->conf.bind = 1; #else ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |