]> git.kaiwu.me - nginx.git/commit
Fixed alias in regex locations with limit_except/if.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 16 May 2014 13:42:24 +0000 (17:42 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 16 May 2014 13:42:24 +0000 (17:42 +0400)
commitffba0eeefbdbc36d8bb826523355fd31d8929a27
tree4db5cb4564080c8d9812723f51efd16025ea6c85
parenta785be76f62ef76683034b4df99e0f353bb58921
Fixed alias in regex locations with limit_except/if.

The ngx_http_map_uri_to_path() function used clcf->regex to detect if
it's working within a location given by a regular expression and have
to replace full URI with alias (instead of a part matching the location
prefix).  This is incorrect due to clcf->regex being false in implicit
locations created by if and limit_except.

Fix is to preserve relevant information in clcf->alias instead, by setting
it to NGX_MAX_SIZE_T_VALUE if an alias was specified in a regex location.
src/http/ngx_http_core_module.c