Mercurial > hg > nginx-vendor-current
comparison src/event/ngx_event.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 | f41d4b305d22 |
children | 5cb5db9975ba |
comparison
equal
deleted
inserted
replaced
673:1e5c7a976f48 | 674:4dcaf40cc702 |
---|---|
1062 #if (NGX_DEBUG) | 1062 #if (NGX_DEBUG) |
1063 ngx_event_conf_t *ecf = conf; | 1063 ngx_event_conf_t *ecf = conf; |
1064 | 1064 |
1065 ngx_int_t rc; | 1065 ngx_int_t rc; |
1066 ngx_str_t *value; | 1066 ngx_str_t *value; |
1067 ngx_event_debug_t *dc; | |
1068 struct hostent *h; | 1067 struct hostent *h; |
1069 ngx_cidr_t cidr; | 1068 ngx_cidr_t *cidr; |
1070 | 1069 |
1071 value = cf->args->elts; | 1070 value = cf->args->elts; |
1072 | 1071 |
1073 dc = ngx_array_push(&ecf->debug_connection); | 1072 cidr = ngx_array_push(&ecf->debug_connection); |
1074 if (dc == NULL) { | 1073 if (cidr == NULL) { |
1075 return NGX_CONF_ERROR; | 1074 return NGX_CONF_ERROR; |
1076 } | 1075 } |
1077 | 1076 |
1078 rc = ngx_ptocidr(&value[1], &cidr); | 1077 #if (NGX_HAVE_UNIX_DOMAIN) |
1078 | |
1079 if (ngx_strcmp(value[1].data, "unix:") == 0) { | |
1080 cidr->family = AF_UNIX; | |
1081 return NGX_CONF_OK; | |
1082 } | |
1083 | |
1084 #endif | |
1085 | |
1086 rc = ngx_ptocidr(&value[1], cidr); | |
1079 | 1087 |
1080 if (rc == NGX_DONE) { | 1088 if (rc == NGX_DONE) { |
1081 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 1089 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, |
1082 "low address bits of %V are meaningless", &value[1]); | 1090 "low address bits of %V are meaningless", &value[1]); |
1083 rc = NGX_OK; | 1091 return NGX_CONF_OK; |
1084 } | 1092 } |
1085 | 1093 |
1086 if (rc == NGX_OK) { | 1094 if (rc == NGX_OK) { |
1087 | |
1088 /* AF_INET only */ | |
1089 | |
1090 if (cidr.family != AF_INET) { | |
1091 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
1092 "\"debug_connection\" supports IPv4 only"); | |
1093 return NGX_CONF_ERROR; | |
1094 } | |
1095 | |
1096 dc->mask = cidr.u.in.mask; | |
1097 dc->addr = cidr.u.in.addr; | |
1098 | |
1099 return NGX_CONF_OK; | 1095 return NGX_CONF_OK; |
1100 } | 1096 } |
1101 | 1097 |
1102 h = gethostbyname((char *) value[1].data); | 1098 h = gethostbyname((char *) value[1].data); |
1103 | 1099 |
1105 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1101 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1106 "host \"%s\" not found", value[1].data); | 1102 "host \"%s\" not found", value[1].data); |
1107 return NGX_CONF_ERROR; | 1103 return NGX_CONF_ERROR; |
1108 } | 1104 } |
1109 | 1105 |
1110 dc->mask = 0xffffffff; | 1106 cidr->family = AF_INET; |
1111 dc->addr = *(in_addr_t *)(h->h_addr_list[0]); | 1107 cidr->u.in.mask = 0xffffffff; |
1108 cidr->u.in.addr = *(in_addr_t *)(h->h_addr_list[0]); | |
1112 | 1109 |
1113 #else | 1110 #else |
1114 | 1111 |
1115 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 1112 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, |
1116 "\"debug_connection\" is ignored, you need to rebuild " | 1113 "\"debug_connection\" is ignored, you need to rebuild " |
1140 ecf->name = (void *) NGX_CONF_UNSET; | 1137 ecf->name = (void *) NGX_CONF_UNSET; |
1141 | 1138 |
1142 #if (NGX_DEBUG) | 1139 #if (NGX_DEBUG) |
1143 | 1140 |
1144 if (ngx_array_init(&ecf->debug_connection, cycle->pool, 4, | 1141 if (ngx_array_init(&ecf->debug_connection, cycle->pool, 4, |
1145 sizeof(ngx_event_debug_t)) == NGX_ERROR) | 1142 sizeof(ngx_cidr_t)) == NGX_ERROR) |
1146 { | 1143 { |
1147 return NULL; | 1144 return NULL; |
1148 } | 1145 } |
1149 | 1146 |
1150 #endif | 1147 #endif |