diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c
index e13393d..98cff7e 100644
--- a/src/http/modules/ngx_http_userid_filter_module.c
+++ b/src/http/modules/ngx_http_userid_filter_module.c
@@ -300,12 +300,10 @@
 ngx_http_userid_set_uid(ngx_http_request_t *r, ngx_http_userid_ctx_t *ctx,
     ngx_http_userid_conf_t *conf)
 {
-    u_char              *cookie, *p;
-    size_t               len;
-    socklen_t            slen;
-    struct sockaddr_in   sin;
-    ngx_str_t            src, dst;
-    ngx_table_elt_t     *set_cookie, *p3p;
+    u_char           *cookie, *p;
+    size_t            len;
+    ngx_str_t         src, dst;
+    ngx_table_elt_t  *set_cookie, *p3p;
 
     /*
      * TODO: in the threaded mode the sequencers should be in TLS and their
@@ -327,18 +325,8 @@
 
         } else {
             if (conf->service == NGX_CONF_UNSET) {
-                if (r->in_addr == 0) {
-                    slen = sizeof(struct sockaddr_in);
-                    if (getsockname(r->connection->fd,
-                                    (struct sockaddr *) &sin, &slen)
-                        == -1)
-                    {
-                        ngx_connection_error(r->connection, ngx_socket_errno,
-                                             "getsockname() failed");
-                        return NGX_ERROR;
-                    }
-
-                    r->in_addr = sin.sin_addr.s_addr;
+                if (ngx_http_server_addr(r, NULL) != NGX_OK) {
+                    return NGX_ERROR;
                 }
 
                 ctx->uid_set[0] = htonl(r->in_addr);
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 16f82c9..d4ddf45 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -220,9 +220,7 @@
 ngx_http_init_request(ngx_event_t *rev)
 {
     ngx_time_t                 *tp;
-    socklen_t                   len;
     ngx_uint_t                  i;
-    struct sockaddr_in          sin;
     ngx_connection_t           *c;
     ngx_http_request_t         *r;
     ngx_http_in_port_t         *hip;
@@ -295,6 +293,8 @@
 
     i = 0;
 
+    r->connection = c;
+
     if (hip->naddrs > 1) {
 
         /*
@@ -302,7 +302,7 @@
          * is the "*:port" wildcard so getsockname() is needed to determine
          * the server address.
          *
-         * AcceptEx() already gave this address.
+         * AcceptEx() already has given this address.
          */
 
 #if (NGX_WIN32)
@@ -313,15 +313,10 @@
         } else
 #endif
         {
-            len = sizeof(struct sockaddr_in);
-            if (getsockname(c->fd, (struct sockaddr *) &sin, &len) == -1) {
-                ngx_connection_error(c, ngx_socket_errno,
-                                     "getsockname() failed");
+            if (ngx_http_server_addr(r, NULL) != NGX_OK) {
                 ngx_http_close_connection(c);
                 return;
             }
-
-            r->in_addr = sin.sin_addr.s_addr;
         }
 
         /* the last address is "*" */
@@ -426,8 +421,6 @@
     c->single_connection = 1;
     c->destroyed = 0;
 
-    r->connection = c;
-
     r->main = r;
 
     tp = ngx_timeofday();
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index ebc24a6..971f705 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -808,32 +808,22 @@
 ngx_http_variable_server_addr(ngx_http_request_t *r,
     ngx_http_variable_value_t *v, uintptr_t data)
 {
-    socklen_t            len;
-    ngx_connection_t    *c;
-    struct sockaddr_in   sin;
+    ngx_str_t  s;
 
-    v->data = ngx_palloc(r->pool, INET_ADDRSTRLEN);
-    if (v->data == NULL) {
+    s.data = ngx_palloc(r->pool, INET_ADDRSTRLEN);
+    if (s.data == NULL) {
         return NGX_ERROR;
     }
 
-    c = r->connection;
-
-    if (r->in_addr == 0) {
-        len = sizeof(struct sockaddr_in);
-        if (getsockname(c->fd, (struct sockaddr *) &sin, &len) == -1) {
-            ngx_connection_error(c, ngx_socket_errno, "getsockname() failed");
-            return NGX_ERROR;
-        }
-
-        r->in_addr = sin.sin_addr.s_addr;
+    if (ngx_http_server_addr(r, &s) != NGX_OK) {
+        return NGX_ERROR;
     }
 
-    v->len = ngx_inet_ntop(c->listening->family, &r->in_addr,
-                           v->data, INET_ADDRSTRLEN);
+    v->len = s.len;
     v->valid = 1;
     v->no_cacheable = 0;
     v->not_found = 0;
+    v->data = s.data;
 
     return NGX_OK;
 }
