~ubuntu-branches/ubuntu/oneiric/nginx/oneiric

« back to all changes in this revision

Viewing changes to src/http/ngx_http_variables.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2011-06-01 19:12:25 UTC
  • mfrom: (4.2.33 sid)
  • Revision ID: james.westby@ubuntu.com-20110601191225-8gzfabmbwlwj758m
Tags: 1.0.4-1
* New upstream release
* debian/*.lintian-overrides, debian/rules:
  + Removed unused lintian for missing manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1661
1661
 
1662
1662
 
1663
1663
void *
1664
 
ngx_http_map_find(ngx_http_request_t *r, ngx_http_map_t *map, ngx_uint_t key,
1665
 
    u_char *text, size_t len, ngx_str_t *match)
 
1664
ngx_http_map_find(ngx_http_request_t *r, ngx_http_map_t *map, ngx_str_t *match)
1666
1665
{
1667
 
    void  *p;
1668
 
 
1669
 
    p = ngx_hash_find_combined(&map->hash, key, text, len);
1670
 
    if (p) {
1671
 
        return p;
 
1666
    void        *value;
 
1667
    u_char      *low;
 
1668
    size_t       len;
 
1669
    ngx_uint_t   key;
 
1670
 
 
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
1690
#if (NGX_PCRE)