ngx_str_t header;
ngx_array_t *headers;
+
+ u_char *file;
+ ngx_uint_t line;
} ngx_mail_auth_http_conf_t;
ahcf->timeout = NGX_CONF_UNSET_MSEC;
+ ahcf->file = cf->conf_file->file.name.data;
+ ahcf->line = cf->conf_file->line;
+
return ahcf;
}
conf->peer = prev->peer;
conf->host_header = prev->host_header;
conf->uri = prev->uri;
+
+ if (conf->peer == NULL) {
+ ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+ "no \"http_auth\" is defined for server in %s:%ui",
+ conf->file, conf->line);
+
+ return NGX_CONF_ERROR;
+ }
}
ngx_conf_merge_msec_value(conf->timeout, prev->timeout, 60000);
u.uri_part = 1;
u.one_addr = 1;
+ if (ngx_strncmp(u.url.data, "http://", 7) == 0) {
+ u.url.len -= 7;
+ u.url.data += 7;
+ }
+
if (ngx_parse_url(cf, &u) != NGX_OK) {
if (u.err) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"%s in auth_http \"%V\"", u.err, &u.url);
}
+
+ return NGX_CONF_ERROR;
}
ahcf->peer = u.addrs;