Resolver: added support for domain names with a trailing dot.

This commit is contained in:
Yichun Zhang 2014-01-10 11:22:14 -08:00
parent 70b48a491a
commit 2e2c9dba16

View File

@ -356,6 +356,10 @@ ngx_resolve_name(ngx_resolver_ctx_t *ctx)
r = ctx->resolver; r = ctx->resolver;
if (ctx->name.len > 0 && ctx->name.data[ctx->name.len - 1] == '.') {
ctx->name.len--;
}
ngx_log_debug1(NGX_LOG_DEBUG_CORE, r->log, 0, ngx_log_debug1(NGX_LOG_DEBUG_CORE, r->log, 0,
"resolve: \"%V\"", &ctx->name); "resolve: \"%V\"", &ctx->name);