# 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 --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c --- a/src/mail/ngx_mail_auth_http_module.c +++ b/src/mail/ngx_mail_auth_http_module.c @@ -1405,7 +1405,14 @@ ngx_mail_auth_http(ngx_conf_t *cf, ngx_c 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) {