Mercurial > hg > nginx-vendor-current
diff src/mail/ngx_mail_core_module.c @ 646:615b5ea36fc0 NGINX_1_1_7
nginx 1.1.7
*) Feature: support of several resolvers in the "resolver" directive.
Thanks to Kirill A. Korinskiy.
*) Bugfix: a segmentation fault occurred on start or while
reconfiguration if the "ssl" directive was used at http level and
there was no "ssl_certificate" defined.
*) Bugfix: reduced memory consumption while proxying of big files if
they were buffered to disk.
*) Bugfix: a segmentation fault might occur in a worker process if
"proxy_http_version 1.1" directive was used.
*) Bugfix: in the "expires @time" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 31 Oct 2011 00:00:00 +0400 |
parents | f39b9e29530d |
children | 753f505670e0 |
line wrap: on
line diff
--- a/src/mail/ngx_mail_core_module.c +++ b/src/mail/ngx_mail_core_module.c @@ -69,7 +69,7 @@ static ngx_command_t ngx_mail_core_comm NULL }, { ngx_string("resolver"), - NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1, + NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_1MORE, ngx_mail_core_resolver, NGX_MAIL_SRV_CONF_OFFSET, 0, @@ -493,7 +493,6 @@ ngx_mail_core_resolver(ngx_conf_t *cf, n { ngx_mail_core_srv_conf_t *cscf = conf; - ngx_url_t u; ngx_str_t *value; value = cf->args->elts; @@ -507,21 +506,11 @@ ngx_mail_core_resolver(ngx_conf_t *cf, n return NGX_CONF_OK; } - ngx_memzero(&u, sizeof(ngx_url_t)); - - u.host = value[1]; - u.port = 53; - - if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) { - ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err); + cscf->resolver = ngx_resolver_create(cf, &value[1], cf->args->nelts - 1); + if (cscf->resolver == NULL) { return NGX_CONF_ERROR; } - cscf->resolver = ngx_resolver_create(cf, &u.addrs[0]); - if (cscf->resolver == NULL) { - return NGX_CONF_OK; - } - return NGX_CONF_OK; }