Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5387:0fbcfab0bfd7 | 5388:fbaae7d1c033 |
---|---|
3217 | 3217 |
3218 len = pclcf->name.len; | 3218 len = pclcf->name.len; |
3219 | 3219 |
3220 #if (NGX_PCRE) | 3220 #if (NGX_PCRE) |
3221 if (clcf->regex == NULL | 3221 if (clcf->regex == NULL |
3222 && ngx_strncmp(clcf->name.data, pclcf->name.data, len) != 0) | 3222 && ngx_filename_cmp(clcf->name.data, pclcf->name.data, len) != 0) |
3223 #else | 3223 #else |
3224 if (ngx_strncmp(clcf->name.data, pclcf->name.data, len) != 0) | 3224 if (ngx_filename_cmp(clcf->name.data, pclcf->name.data, len) != 0) |
3225 #endif | 3225 #endif |
3226 { | 3226 { |
3227 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 3227 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
3228 "location \"%V\" is outside location \"%V\"", | 3228 "location \"%V\" is outside location \"%V\"", |
3229 &clcf->name, &pclcf->name); | 3229 &clcf->name, &pclcf->name); |