Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_resolver.c @ 676:bfa81a0490a2 NGINX_1_3_1
nginx 1.3.1
*) Security: now nginx/Windows ignores trailing dot in URI path
component, and does not allow URIs with ":$" in it.
Thanks to Vladimir Kochetkov, Positive Research Center.
*) Feature: the "proxy_pass", "fastcgi_pass", "scgi_pass", "uwsgi_pass"
directives, and the "server" directive inside the "upstream" block,
now support IPv6 addresses.
*) Feature: the "resolver" directive now support IPv6 addresses and an
optional port specification.
*) Feature: the "least_conn" directive inside the "upstream" block.
*) Feature: it is now possible to specify a weight for servers while
using the "ip_hash" directive.
*) Bugfix: a segmentation fault might occur in a worker process if the
"image_filter" directive was used; the bug had appeared in 1.3.0.
*) Bugfix: nginx could not be built with ngx_cpp_test_module; the bug
had appeared in 1.1.12.
*) Bugfix: access to variables from SSI and embedded perl module might
not work after reconfiguration.
Thanks to Yichun Zhang.
*) Bugfix: in the ngx_http_xslt_filter_module.
Thanks to Kuramoto Eiji.
*) Bugfix: memory leak if $geoip_org variable was used.
Thanks to Denis F. Latypoff.
*) Bugfix: in the "proxy_cookie_domain" and "proxy_cookie_path"
directives.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 05 Jun 2012 00:00:00 +0400 |
parents | 4dcaf40cc702 |
children | 981b4c44593b |
comparison
equal
deleted
inserted
replaced
675:7052a9379344 | 676:bfa81a0490a2 |
---|---|
169 continue; | 169 continue; |
170 } | 170 } |
171 | 171 |
172 ngx_memzero(&u, sizeof(ngx_url_t)); | 172 ngx_memzero(&u, sizeof(ngx_url_t)); |
173 | 173 |
174 u.host = names[i]; | 174 u.url = names[i]; |
175 u.port = 53; | 175 u.default_port = 53; |
176 | 176 |
177 if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) { | 177 if (ngx_parse_url(cf->pool, &u) != NGX_OK) { |
178 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err); | 178 if (u.err) { |
179 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
180 "%s in resolver \"%V\"", | |
181 u.err, &u.url); | |
182 } | |
183 | |
179 return NULL; | 184 return NULL; |
180 } | 185 } |
181 | 186 |
182 uc = ngx_array_push(&r->udp_connections); | 187 uc = ngx_array_push(&r->udp_connections); |
183 if (uc == NULL) { | 188 if (uc == NULL) { |
1033 flags = (query->flags_hi << 8) + query->flags_lo; | 1038 flags = (query->flags_hi << 8) + query->flags_lo; |
1034 nqs = (query->nqs_hi << 8) + query->nqs_lo; | 1039 nqs = (query->nqs_hi << 8) + query->nqs_lo; |
1035 nan = (query->nan_hi << 8) + query->nan_lo; | 1040 nan = (query->nan_hi << 8) + query->nan_lo; |
1036 | 1041 |
1037 ngx_log_debug6(NGX_LOG_DEBUG_CORE, r->log, 0, | 1042 ngx_log_debug6(NGX_LOG_DEBUG_CORE, r->log, 0, |
1038 "resolver DNS response %ui fl:%04Xui %ui/%ui/%ui/%ui", | 1043 "resolver DNS response %ui fl:%04Xui %ui/%ui/%ud/%ud", |
1039 ident, flags, nqs, nan, | 1044 ident, flags, nqs, nan, |
1040 (query->nns_hi << 8) + query->nns_lo, | 1045 (query->nns_hi << 8) + query->nns_lo, |
1041 (query->nar_hi << 8) + query->nar_lo); | 1046 (query->nar_hi << 8) + query->nar_lo); |
1042 | 1047 |
1043 if (!(flags & 0x8000)) { | 1048 if (!(flags & 0x8000)) { |
2182 ngx_int_t event; | 2187 ngx_int_t event; |
2183 ngx_event_t *rev, *wev; | 2188 ngx_event_t *rev, *wev; |
2184 ngx_socket_t s; | 2189 ngx_socket_t s; |
2185 ngx_connection_t *c; | 2190 ngx_connection_t *c; |
2186 | 2191 |
2187 s = ngx_socket(AF_INET, SOCK_DGRAM, 0); | 2192 s = ngx_socket(uc->sockaddr->sa_family, SOCK_DGRAM, 0); |
2188 | 2193 |
2189 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &uc->log, 0, "UDP socket %d", s); | 2194 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, &uc->log, 0, "UDP socket %d", s); |
2190 | 2195 |
2191 if (s == -1) { | 2196 if (s == -1) { |
2192 ngx_log_error(NGX_LOG_ALERT, &uc->log, ngx_socket_errno, | 2197 ngx_log_error(NGX_LOG_ALERT, &uc->log, ngx_socket_errno, |