nginx-0.3.18-RELEASE import
*) 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.
diff --git a/src/core/ngx_hash.h b/src/core/ngx_hash.h
index 7449d05..855dde7 100644
--- a/src/core/ngx_hash.h
+++ b/src/core/ngx_hash.h
@@ -54,6 +54,29 @@
} 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_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);