Mercurial > hg > nginx-vendor-0-7
diff src/http/ngx_http_core_module.c @ 354:583decdb82a4 NGINX_0_6_21
nginx 0.6.21
*) Change: if variable values used in a "proxy_pass" directive contain
IP-addresses only, then a "resolver" directive is not mandatory.
resolver
*) Bugfix: a segmentation fault might occur in worker process if a
"proxy_pass" directive with URI-part was used; bug appeared in
0.6.19.
*) Bugfix: if resolver was used on platform that does not support
kqueue, then nginx issued an alert "name is out of response".
Thanks to Andrei Nigmatulin.
*) Bugfix: if the $server_protocol was used in FastCGI parameters and a
request line length was near to the "client_header_buffer_size"
directive value, then nginx issued an alert "fastcgi: the request
record is too big".
*) Bugfix: if a plain text HTTP/0.9 version request was made to HTTPS
server, then nginx returned usual response.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 03 Dec 2007 00:00:00 +0300 |
parents | e10168d6e371 |
children | b743d290eb3b |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -69,7 +69,7 @@ static char *ngx_http_core_keepalive(ngx void *conf); static char *ngx_http_core_internal(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); -static char * ngx_http_core_resolver(ngx_conf_t *cf, ngx_command_t *cmd, +static char *ngx_http_core_resolver(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static char *ngx_http_core_lowat_check(ngx_conf_t *cf, void *post, void *data); @@ -2594,6 +2594,13 @@ ngx_http_core_merge_loc_conf(ngx_conf_t if (conf->resolver == NULL) { conf->resolver = prev->resolver; + + if (conf->resolver == NULL) { + conf->resolver = ngx_resolver_create(NULL, cf->cycle->new_log); + if (conf->resolver == NULL) { + return NGX_OK; + } + } } ngx_conf_merge_path_value(conf->client_body_temp_path, @@ -3393,6 +3400,8 @@ ngx_http_core_resolver(ngx_conf_t *cf, n value = cf->args->elts; + ngx_memzero(&u, sizeof(ngx_url_t)); + u.host = value[1]; u.port = 53;