Mercurial > hg > nginx
comparison src/http/ngx_http.h @ 10:4f3879d9b6f6
nginx-0.0.1-2002-09-11-19:18:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Sep 2002 15:18:33 +0000 |
parents | 6f58641241bb |
children | f323b4f74e4a |
comparison
equal
deleted
inserted
replaced
9:6f58641241bb | 10:4f3879d9b6f6 |
---|---|
5 #include <ngx_config.h> | 5 #include <ngx_config.h> |
6 #include <ngx_types.h> | 6 #include <ngx_types.h> |
7 #include <ngx_hunk.h> | 7 #include <ngx_hunk.h> |
8 #include <ngx_files.h> | 8 #include <ngx_files.h> |
9 #include <ngx_connection.h> | 9 #include <ngx_connection.h> |
10 #include <ngx_config_command.h> | |
10 | 11 |
11 | 12 |
12 #define NGX_HTTP_GET 1 | 13 #define NGX_HTTP_GET 1 |
13 #define NGX_HTTP_HEAD 2 | 14 #define NGX_HTTP_HEAD 2 |
14 #define NGX_HTTP_POST 3 | 15 #define NGX_HTTP_POST 3 |
137 char *url; | 138 char *url; |
138 } ngx_http_log_ctx_t; | 139 } ngx_http_log_ctx_t; |
139 | 140 |
140 | 141 |
141 typedef struct { | 142 typedef struct { |
142 int index; | 143 int index; |
144 void *(*create_srv_conf)(ngx_pool_t *p); | |
145 void *(*create_loc_conf)(ngx_pool_t *p); | |
146 ngx_command_t *commands; | |
147 int (*init_module)(ngx_pool_t *p); | |
148 int (*init_output_body_filter)(int (**next_filter) | |
149 (ngx_http_request_t *r, ngx_chain_t *ch)); | |
143 } ngx_http_module_t; | 150 } ngx_http_module_t; |
144 | 151 |
145 #define NGX_HTTP_MODULE 0 | 152 #define NGX_HTTP_MODULE 0 |
146 | 153 |
147 #define ngx_get_module_loc_conf(r, module) r->loc_conf[module.index] | 154 #define ngx_get_module_loc_conf(r, module) r->loc_conf[module.index] |
148 #define ngx_get_module_ctx(r, module) r->ctx[module.index] | 155 #define ngx_get_module_ctx(r, module) r->ctx[module.index] |
156 | |
157 #define ngx_http_create_ctx(r, ctx, module, size) \ | |
158 do { \ | |
159 ngx_test_null(ctx, ngx_pcalloc(r->pool, size), NGX_ERROR); \ | |
160 r->ctx[module.index] = ctx; \ | |
161 } while (0) | |
149 | 162 |
150 | 163 |
151 | 164 |
152 /* STUB */ | 165 /* STUB */ |
153 #define NGX_INDEX "index.html" | 166 #define NGX_INDEX "index.html" |
157 int ngx_http_init(ngx_pool_t *pool, ngx_log_t *log); | 170 int ngx_http_init(ngx_pool_t *pool, ngx_log_t *log); |
158 | 171 |
159 int ngx_http_init_connection(ngx_connection_t *c); | 172 int ngx_http_init_connection(ngx_connection_t *c); |
160 | 173 |
161 | 174 |
175 extern int ngx_max_module; | |
176 | |
177 extern ngx_http_module_t *ngx_http_modules[]; | |
178 | |
179 | |
180 | |
162 #endif /* _NGX_HTTP_H_INCLUDED_ */ | 181 #endif /* _NGX_HTTP_H_INCLUDED_ */ |