comparison src/http/ngx_http_variables.c @ 628:83b58b182b76 NGINX_1_0_4

nginx 1.0.4 *) Change: now regular expressions case sensitivity in the "map" directive is given by prefixes "~" or "~*". *) Feature: now shared zones and caches use POSIX semaphores on Linux. Thanks to Denis F. Latypoff. *) Bugfix: "stalled" cache updating" alert. *) Bugfix: nginx could not be built --without-http_auth_basic_module; the bug had appeared in 1.0.3.
author Igor Sysoev <http://sysoev.ru>
date Wed, 01 Jun 2011 00:00:00 +0400
parents 8214eaef3530
children 753f505670e0
comparison
equal deleted inserted replaced
627:a63a292c61af 628:83b58b182b76
1659 return NGX_OK; 1659 return NGX_OK;
1660 } 1660 }
1661 1661
1662 1662
1663 void * 1663 void *
1664 ngx_http_map_find(ngx_http_request_t *r, ngx_http_map_t *map, ngx_uint_t key, 1664 ngx_http_map_find(ngx_http_request_t *r, ngx_http_map_t *map, ngx_str_t *match)
1665 u_char *text, size_t len, ngx_str_t *match) 1665 {
1666 { 1666 void *value;
1667 void *p; 1667 u_char *low;
1668 1668 size_t len;
1669 p = ngx_hash_find_combined(&map->hash, key, text, len); 1669 ngx_uint_t key;
1670 if (p) { 1670
1671 return p; 1671 len = match->len;
1672
1673 if (len) {
1674 low = ngx_pnalloc(r->pool, len);
1675 if (low == NULL) {
1676 return NULL;
1677 }
1678
1679 } else {
1680 low = NULL;
1681 }
1682
1683 key = ngx_hash_strlow(low, match->data, len);
1684
1685 value = ngx_hash_find_combined(&map->hash, key, low, len);
1686 if (value) {
1687 return value;
1672 } 1688 }
1673 1689
1674 #if (NGX_PCRE) 1690 #if (NGX_PCRE)
1675 1691
1676 if (len && map->nregex) { 1692 if (len && map->nregex) {