mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
use "localhost" in "Host" header line, if unix socket is used in "auth_http"
This commit is contained in:
parent
1651542b3a
commit
280e5e7072
@ -1405,7 +1405,14 @@ ngx_mail_auth_http(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user