Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 2857:507fc5ac9839
use ngx_connection_local_sockaddr() instead of ngx_http_server_addr()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 18 May 2009 12:58:19 +0000 |
parents | 2e2ae6077ae8 |
children | d0cba58e5bfa |
comparison
equal
deleted
inserted
replaced
2856:f9b5dfcc96d8 | 2857:507fc5ac9839 |
---|---|
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) { |