[nginx] Resolver: added support for domain names with a trailing...
Ruslan Ermilov
ru at nginx.com
Tue Jan 14 12:29:17 UTC 2014
details: http://hg.nginx.org/nginx/rev/d091d16ed398
branches:
changeset: 5505:d091d16ed398
user: Yichun Zhang <agentzh at gmail.com>
date: Fri Jan 10 11:22:14 2014 -0800
description:
Resolver: added support for domain names with a trailing dot.
diffstat:
src/core/ngx_resolver.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r 8ed467553f6b -r d091d16ed398 src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c Tue Jan 14 15:56:40 2014 +0400
+++ b/src/core/ngx_resolver.c Fri Jan 10 11:22:14 2014 -0800
@@ -356,6 +356,10 @@ ngx_resolve_name(ngx_resolver_ctx_t *ctx
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,
"resolve: \"%V\"", &ctx->name);
More information about the nginx-devel
mailing list