aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 30b2c0c50..754a788d1 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1625,8 +1625,8 @@ ngx_http_server_addr(ngx_http_request_t *r, ngx_str_t *s)
return NGX_OK;
}
- s->len = ngx_inet_ntop(c->listening->family, &r->in_addr,
- s->data, NGX_INET_ADDRSTRLEN);
+ s->len = ngx_sock_ntop((struct sockaddr *) &sin, s->data,
+ NGX_INET_ADDRSTRLEN);
return NGX_OK;
}