Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#182 closed defect (fixed)

map with hostnames does not drop terminating dot

Reported by: Owned by: somebody
Priority: minor Milestone: 1.3
Component: nginx-module Version: 1.3.x
Keywords: map hostnames Cc:
uname -a: not important
nginx -V: at least 1.2.1 and CURRENT


In ngx_http_map_variable function of ngx_http_map_module.c there are lines:
124 len = val.len;
126 if (len && map->hostnames &&[len - 1] == '.') {
127 len--;
128 }
130 value = ngx_http_map_find(r, &map->map, &val);

But 'len' is not used after that, so terminating dot cannot be ignored for map with hostnames as it should.

Change History (3)

comment:1 by Maxim Dounin, 11 years ago

Status: newaccepted

Thank you for report. Actually, the code is dead since introduction in 0.3.16, due to map->hostnames being always set to 0.

comment:2 by Ruslan Ermilov, 11 years ago

Resolution: fixed
Status: acceptedclosed

In [4713/nginx]:

(The changeset message doesn't reference this ticket)

comment:3 by Maxim Dounin, 10 years ago

In 4786/nginx:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.