From f9c1e60806a6dcb99dfdd99e6071a331b7c1985b Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 24 Sep 2006 14:45:37 +0000 Subject: [PATCH] fix uri part in "proxy_pass http://unix:...", the bug appeared in nginx-0.3.47 --- src/core/ngx_inet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index 53219932e..cf4b8f699 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c @@ -239,11 +239,13 @@ ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u) #if (NGX_HAVE_UNIX_DOMAIN) u->type = NGX_PARSE_URL_UNIX; - u->uri = u->url; p += 5; len -= 5; + u->uri.len = len; + u->uri.data = p; + if (u->uri_part) { for (i = 0; i < len; i++) { @@ -285,7 +287,8 @@ ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u) u->peers->peer[0].sockaddr = (struct sockaddr *) saun; u->peers->peer[0].socklen = sizeof(struct sockaddr_un); - u->peers->peer[0].name = u->url; + u->peers->peer[0].name.len = len + 5; + u->peers->peer[0].name.data = u->url.data; u->peers->peer[0].uri_separator = ":"; u->host_header.len = sizeof("localhost") - 1;