Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_resolver.c @ 674:4dcaf40cc702 NGINX_1_3_0
nginx 1.3.0
*) Feature: the "debug_connection" directive now supports IPv6 addresses
and the "unix:" parameter.
*) Feature: the "set_real_ip_from" directive and the "proxy" parameter
of the "geo" directive now support IPv6 addresses.
*) Feature: the "real_ip_recursive", "geoip_proxy", and
"geoip_proxy_recursive" directives.
*) Feature: the "proxy_recursive" parameter of the "geo" directive.
*) Bugfix: a segmentation fault might occur in a worker process if the
"resolver" directive was used.
*) Bugfix: a segmentation fault might occur in a worker process if the
"fastcgi_pass", "scgi_pass", or "uwsgi_pass" directives were used and
backend returned incorrect response.
*) Bugfix: a segmentation fault might occur in a worker process if the
"rewrite" directive was used and new request arguments in a
replacement used variables.
*) Bugfix: nginx might hog CPU if the open file resource limit was
reached.
*) Bugfix: nginx might loop infinitely over backends if the
"proxy_next_upstream" directive with the "http_404" parameter was
used and there were backup servers specified in an upstream block.
*) Bugfix: adding the "down" parameter of the "server" directive might
cause unneeded client redistribution among backend servers if the
"ip_hash" directive was used.
*) Bugfix: socket leak.
Thanks to Yichun Zhang.
*) Bugfix: in the ngx_http_fastcgi_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 15 May 2012 00:00:00 +0400 |
parents | 9fbf3ad94cbf |
children | bfa81a0490a2 |
comparison
equal
deleted
inserted
replaced
673:1e5c7a976f48 | 674:4dcaf40cc702 |
---|---|
511 | 511 |
512 ngx_queue_remove(&rn->queue); | 512 ngx_queue_remove(&rn->queue); |
513 | 513 |
514 /* lock alloc mutex */ | 514 /* lock alloc mutex */ |
515 | 515 |
516 ngx_resolver_free_locked(r, rn->query); | 516 if (rn->query) { |
517 rn->query = NULL; | 517 ngx_resolver_free_locked(r, rn->query); |
518 rn->query = NULL; | |
519 } | |
518 | 520 |
519 if (rn->cnlen) { | 521 if (rn->cnlen) { |
520 ngx_resolver_free_locked(r, rn->u.cname); | 522 ngx_resolver_free_locked(r, rn->u.cname); |
521 } | 523 } |
522 | 524 |
1407 | 1409 |
1408 if (naddrs > 1) { | 1410 if (naddrs > 1) { |
1409 ngx_resolver_free(r, addrs); | 1411 ngx_resolver_free(r, addrs); |
1410 } | 1412 } |
1411 | 1413 |
1414 ngx_resolver_free(r, rn->query); | |
1415 rn->query = NULL; | |
1416 | |
1412 return; | 1417 return; |
1413 | 1418 |
1414 } else if (cname) { | 1419 } else if (cname) { |
1415 | 1420 |
1416 /* CNAME only */ | 1421 /* CNAME only */ |
1438 if (ctx) { | 1443 if (ctx) { |
1439 ctx->name = name; | 1444 ctx->name = name; |
1440 | 1445 |
1441 (void) ngx_resolve_name_locked(r, ctx); | 1446 (void) ngx_resolve_name_locked(r, ctx); |
1442 } | 1447 } |
1448 | |
1449 ngx_resolver_free(r, rn->query); | |
1450 rn->query = NULL; | |
1443 | 1451 |
1444 return; | 1452 return; |
1445 } | 1453 } |
1446 | 1454 |
1447 ngx_log_error(r->log_level, r->log, 0, | 1455 ngx_log_error(r->log_level, r->log, 0, |
1832 | 1840 |
1833 len = 0; | 1841 len = 0; |
1834 p--; | 1842 p--; |
1835 *p-- = '\0'; | 1843 *p-- = '\0'; |
1836 | 1844 |
1845 if (ctx->name.len == 0) { | |
1846 return NGX_DECLINED; | |
1847 } | |
1848 | |
1837 for (s = ctx->name.data + ctx->name.len - 1; s >= ctx->name.data; s--) { | 1849 for (s = ctx->name.data + ctx->name.len - 1; s >= ctx->name.data; s--) { |
1838 if (*s != '.') { | 1850 if (*s != '.') { |
1839 *p = *s; | 1851 *p = *s; |
1840 len++; | 1852 len++; |
1841 | 1853 |