diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-23 19:37:06 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-09-23 19:37:06 +0400 |
commit | d2ef70e97acbda42204d589d0886be88314016c2 (patch) | |
tree | 85fa5a75524703bfc0d22bda12c255aa95afef6b /src/http/ngx_http_core_module.c | |
parent | f52a2c7585092b980866fde5d1a0569fe2bf43b2 (diff) | |
download | nginx-d2ef70e97acbda42204d589d0886be88314016c2.tar.gz nginx-d2ef70e97acbda42204d589d0886be88314016c2.zip |
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".
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 85b4fe882..f8c695645 100644 --- 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, ngx_command_t *cmd, void *dummy) #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, |