# HG changeset patch # User Igor Sysoev # Date 1261755820 0 # Node ID a2a5812cf4f46890af96fe465ab7ffc1f0dcdb0a # Parent 6cc74c87c656e3ac847efb82cb98d8ca181f85e4 use "localhost" in "Host" header line, if unix socket is used in "auth_http" diff -r 6cc74c87c656 -r a2a5812cf4f4 src/mail/ngx_mail_auth_http_module.c --- 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) {