Opened 11 years ago

Last modified 8 years ago

#384 accepted defect

trailing dot in server_name

Reported by: Sergey Kandaurov Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.3.x
Keywords: Cc:
uname -a:
nginx -V: nginx version: nginx/1.5.3
built by clang 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
configure arguments:

Description (last modified by Sergey Kandaurov)

nginx should treat server_name values with and without trailing dot as identical to each other. Thus, it shall warn and continue during configuration syntax check for the below snippet due to conflicting server_name.

    server {
        server_name  localhost;

    server {
        server_name  localhost.;

Attachments (1)

trailing-dot-in-server_name.patch (684 bytes ) - added by Leslie Zhai 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Sergey Kandaurov, 10 years ago

Description: modified (diff)

by Leslie Zhai, 10 years ago

comment:2 by Leslie Zhai, 10 years ago

Please have a look at trailing-dot-in-server_name.patch

value[i].data[value[i].len - 1] == '.'

it treat server_name values with trailing dot as invalid one.

comment:3 by Maxim Dounin, 8 years ago

Status: newaccepted
Note: See TracTickets for help on using tickets.