diff src/http/ngx_http_core_module.h @ 88:674d333f4296

nginx-0.0.1-2003-05-14-21:13:13 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 May 2003 17:13:13 +0000
parents 5f6d848dcbef
children 29bf798b583f
line wrap: on
line diff
--- 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 */