~ubuntu-branches/ubuntu/karmic/nginx/karmic

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_map_module.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-05-31 18:38:56 UTC
  • mfrom: (1.1.11 upstream) (4.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090531183856-lkdgdzr9m731fz92
Tags: 0.7.59-1
* New upstream release, first in Debian for the 0.7 branch. Among other
  issues, it also fixes the problem with wildcard dns names used with SSL.
  (Closes: #515904)
* debian/watch: updated.
* debian/postinst: fixed a bashism. (Closes: #507913)
* debian/conf/nginx.conf: removed default_type. (Closes: #509390)
* debian/control: updated Standards-Version to 3.8.1, no changes needed.
* debian/NEWS.Debian: documented the issues with
  server_names_hash_bucket_size. (Closes: #524785)

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
    size_t                      len;
108
108
    u_char                     *name;
109
 
    ngx_uint_t                  key, i;
 
109
    ngx_uint_t                  key;
110
110
    ngx_http_variable_value_t  *vv, *value;
111
111
 
112
112
    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
130
130
        return NGX_OK;
131
131
    }
132
132
 
133
 
    name = ngx_palloc(r->pool, len);
 
133
    name = ngx_pnalloc(r->pool, len);
134
134
    if (name == NULL) {
135
135
        return NGX_ERROR;
136
136
    }
137
137
 
138
 
    key = 0;
139
 
    for (i = 0; i < len; i++) {
140
 
        name[i] = ngx_tolower(vv->data[i]);
141
 
        key = ngx_hash(key, name[i]);
142
 
    }
 
138
    key = ngx_hash_strlow(name, vv->data, len);
143
139
 
144
140
    value = ngx_hash_find_combined(&map->hash, key, name, len);
145
141
 
378
374
    if (ngx_strcmp(value[0].data, "include") == 0) {
379
375
        file = value[1];
380
376
 
381
 
        if (ngx_conf_full_name(cf->cycle, &file, 1) == NGX_ERROR){
 
377
        if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK){
382
378
            return NGX_CONF_ERROR;
383
379
        }
384
380