diff options
Diffstat (limited to 'src/http/ngx_http_core_module.h')
-rw-r--r-- | src/http/ngx_http_core_module.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 6284aac65..3208d0de1 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -50,6 +50,21 @@ typedef struct { } ngx_http_server_name_t; +#define NGX_HTTP_TYPES_HASH_PRIME 13 + +#define ngx_http_types_hash_key(key, ext) \ + { \ + int n; \ + for (key = 0, n = 0; n < ext.len; n++) { \ + key += ext.data[n]; \ + } \ + key %= NGX_HTTP_TYPES_HASH_PRIME; \ + } + +typedef struct { + ngx_str_t exten; + ngx_str_t type; +} ngx_http_type_t; typedef struct { @@ -61,6 +76,8 @@ typedef struct { ngx_str_t doc_root; /* root */ + ngx_array_t *types; + int sendfile; /* sendfile */ time_t send_timeout; /* send_timeout */ size_t send_lowat; /* send_lowa */ |