Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 5388:fbaae7d1c033
Caseless location tree construction (ticket #90).
Location tree was always constructed using case-sensitive comparison, even
on case-insensitive systems. This resulted in incorrect operation if
uppercase letters were used in location directives. Notably, the
following config:
location /a { ... }
location /B { ... }
failed to properly map requests to "/B" into "location /B".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 23 Sep 2013 19:37:06 +0400 |
parents | ee2a4c68fb35 |
children | fcecb9c6a057 |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3219,9 +3219,9 @@ ngx_http_core_location(ngx_conf_t *cf, n #if (NGX_PCRE) if (clcf->regex == NULL - && ngx_strncmp(clcf->name.data, pclcf->name.data, len) != 0) + && ngx_filename_cmp(clcf->name.data, pclcf->name.data, len) != 0) #else - if (ngx_strncmp(clcf->name.data, pclcf->name.data, len) != 0) + if (ngx_filename_cmp(clcf->name.data, pclcf->name.data, len) != 0) #endif { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,