comparison src/mail/ngx_mail_auth_http_module.c @ 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 f0d596e84634
children dd1570b6f237
comparison
equal deleted inserted replaced
3405:6cc74c87c656 3406:a2a5812cf4f4
1403 return NGX_CONF_ERROR; 1403 return NGX_CONF_ERROR;
1404 } 1404 }
1405 1405
1406 ahcf->peer = u.addrs; 1406 ahcf->peer = u.addrs;
1407 1407
1408 ahcf->host_header = u.host; 1408 if (u.family != AF_UNIX) {
1409 ahcf->host_header = u.host;
1410
1411 } else {
1412 ahcf->host_header.len = sizeof("localhost") - 1;
1413 ahcf->host_header.data = (u_char *) "localhost";
1414 }
1415
1409 ahcf->uri = u.uri; 1416 ahcf->uri = u.uri;
1410 1417
1411 if (ahcf->uri.len == 0) { 1418 if (ahcf->uri.len == 0) {
1412 ahcf->uri.len = sizeof("/") - 1; 1419 ahcf->uri.len = sizeof("/") - 1;
1413 ahcf->uri.data = (u_char *) "/"; 1420 ahcf->uri.data = (u_char *) "/";