comparison src/http/ngx_http_request.c @ 501:98143f74eb3d NGINX_0_7_58

nginx 0.7.58 *) Feature: a "listen" directive of the mail proxy module supports IPv6. *) Feature: the "image_filter_jpeg_quality" directive. *) Feature: the "client_body_in_single_buffer" directive. *) Feature: the $request_body variable. *) Bugfix: in ngx_http_autoindex_module in file name links having a ":" symbol in the name. *) Bugfix: "make upgrade" procedure did not work; the bug had appeared in 0.7.53. Thanks to Denis F. Latypoff.
author Igor Sysoev <http://sysoev.ru>
date Mon, 18 May 2009 00:00:00 +0400
parents 829f9a66a659
children 499474178a11
comparison
equal deleted inserted replaced
500:bb2281a3edb6 501:98143f74eb3d
308 * there are several addresses on this port and one of them 308 * there are several addresses on this port and one of them
309 * is an "*:port" wildcard so getsockname() in ngx_http_server_addr() 309 * is an "*:port" wildcard so getsockname() in ngx_http_server_addr()
310 * is required to determine a server address 310 * is required to determine a server address
311 */ 311 */
312 312
313 if (ngx_http_server_addr(r, NULL) != NGX_OK) { 313 if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) {
314 ngx_http_close_connection(c); 314 ngx_http_close_connection(c);
315 return; 315 return;
316 } 316 }
317 317
318 switch (c->local_sockaddr->sa_family) { 318 switch (c->local_sockaddr->sa_family) {
319 319
320 #if (NGX_HAVE_INET6) 320 #if (NGX_HAVE_INET6)
321 case AF_INET6: 321 case AF_INET6:
322 sin6 = (struct sockaddr_in6 *) c->local_sockaddr; 322 sin6 = (struct sockaddr_in6 *) c->local_sockaddr;
323 323
324 addr6 = (ngx_http_in6_addr_t *) port->addrs; 324 addr6 = port->addrs;
325 325
326 /* the last address is "*" */ 326 /* the last address is "*" */
327 327
328 for (i = 0; i < port->naddrs - 1; i++) { 328 for (i = 0; i < port->naddrs - 1; i++) {
329 if (ngx_memcmp(&addr6[i].addr6, &sin6->sin6_addr, 16) == 0) { 329 if (ngx_memcmp(&addr6[i].addr6, &sin6->sin6_addr, 16) == 0) {
358 358
359 switch (c->local_sockaddr->sa_family) { 359 switch (c->local_sockaddr->sa_family) {
360 360
361 #if (NGX_HAVE_INET6) 361 #if (NGX_HAVE_INET6)
362 case AF_INET6: 362 case AF_INET6:
363 addr6 = (ngx_http_in6_addr_t *) port->addrs; 363 addr6 = port->addrs;
364 addr_conf = &addr6[0].conf; 364 addr_conf = &addr6[0].conf;
365 break; 365 break;
366 #endif 366 #endif
367 367
368 default: /* AF_INET */ 368 default: /* AF_INET */