Mercurial > hg > nginx
changeset 3406:a2a5812cf4f4
use "localhost" in "Host" header line, if unix socket is used in "auth_http"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 25 Dec 2009 15:43:40 +0000 |
parents | 6cc74c87c656 |
children | 99085281314e |
files | src/mail/ngx_mail_auth_http_module.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mail/ngx_mail_auth_http_module.c Fri Dec 25 15:00:08 2009 +0000 +++ b/src/mail/ngx_mail_auth_http_module.c Fri Dec 25 15:43:40 2009 +0000 @@ -1405,7 +1405,14 @@ ahcf->peer = u.addrs; - ahcf->host_header = u.host; + if (u.family != AF_UNIX) { + ahcf->host_header = u.host; + + } else { + ahcf->host_header.len = sizeof("localhost") - 1; + ahcf->host_header.data = (u_char *) "localhost"; + } + ahcf->uri = u.uri; if (ahcf->uri.len == 0) {