diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-12-26 17:07:48 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-12-26 17:07:48 +0000 |
commit | 305a9d83cfba0d0330bd12af4ca56943b10e958e (patch) | |
tree | 8dc3ead91f77a4ae8953f289f57ff49b4ce9c9f1 /src/core/ngx_hash.h | |
parent | f9cbecc16a9851e8403bf7dae96feebf63b1ac3e (diff) | |
download | nginx-305a9d83cfba0d0330bd12af4ca56943b10e958e.tar.gz nginx-305a9d83cfba0d0330bd12af4ca56943b10e958e.zip |
nginx-0.3.18-RELEASE importrelease-0.3.18
*) Feature: the "server_names" directive supports the ".domain.tld"
names.
*) Feature: the "server_names" directive uses the hash for the
"*.domain.tld" names and more effective hash for usual names.
*) Change: the "server_names_hash_max_size" and
"server_names_hash_bucket_size" directives.
*) Change: the "server_names_hash" and "server_names_hash_threshold"
directives were canceled.
*) Feature: the "valid_referers" directive uses the hash site names.
*) Change: now the "valid_referers" directive checks the site names
only without the URI part.
*) Bugfix: some ".domain.tld" names incorrectly processed by the
ngx_http_map_module.
*) Bugfix: segmentation fault was occurred if configuration file did
not exist; the bug had appeared in 0.3.12.
*) Bugfix: on 64-bit platforms segmentation fault may occurred on
start; the bug had appeared in 0.3.16.
Diffstat (limited to 'src/core/ngx_hash.h')
-rw-r--r-- | src/core/ngx_hash.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/ngx_hash.h b/src/core/ngx_hash.h index 7449d0571..855dde7c4 100644 --- a/src/core/ngx_hash.h +++ b/src/core/ngx_hash.h @@ -54,6 +54,29 @@ typedef struct { } ngx_hash_init_t; +#define NGX_HASH_SMALL 1 +#define NGX_HASH_LARGE 2 + +#define NGX_HASH_LARGE_ASIZE 16384 +#define NGX_HASH_LARGE_HSIZE 10007 + +#define NGX_HASH_WILDCARD_KEY 1 + + +typedef struct { + ngx_uint_t hsize; + + ngx_pool_t *pool; + ngx_pool_t *temp_pool; + + ngx_array_t keys; + ngx_array_t *keys_hash; + + ngx_array_t dns_wildcards; + ngx_array_t *dns_wildcards_hash; +} ngx_hash_keys_arrays_t; + + typedef struct { void **buckets; ngx_uint_t hash_size; @@ -86,6 +109,10 @@ ngx_int_t ngx_hash_wildcard_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t ngx_hash_key(u_char *data, size_t len); ngx_uint_t ngx_hash_key_lc(u_char *data, size_t len); +ngx_int_t ngx_hash_keys_array_init(ngx_hash_keys_arrays_t *ha, ngx_uint_t type); +ngx_int_t ngx_hash_add_key(ngx_hash_keys_arrays_t *ha, ngx_str_t *key, + void *value, ngx_uint_t flags); + ngx_int_t ngx_hash0_init(ngx_hash0_t *hash, ngx_pool_t *pool, void *names, ngx_uint_t nelts); |