comparison src/http/ngx_http.h @ 40:d5d4f3bba6f0

nginx-0.0.1-2002-12-26-10:24:21 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 26 Dec 2002 07:24:21 +0000
parents d45effe5854c
children 59e7c7f30d49
comparison
equal deleted inserted replaced
39:83fa61cd3d2f 40:d5d4f3bba6f0
178 char *client; 178 char *client;
179 char *url; 179 char *url;
180 } ngx_http_log_ctx_t; 180 } ngx_http_log_ctx_t;
181 181
182 182
183 typedef int (*ngx_http_output_header_filter_p)(ngx_http_request_t *r);
184
185 typedef int (*ngx_http_output_body_filter_p)
186 (ngx_http_request_t *r, ngx_chain_t *chain);
187
188
189
183 typedef struct { 190 typedef struct {
184 int index; 191 int index;
185 192
186 void *(*create_srv_conf)(ngx_pool_t *p); 193 void *(*create_srv_conf)(ngx_pool_t *p);
187 void *(*create_loc_conf)(ngx_pool_t *p); 194 void *(*create_loc_conf)(ngx_pool_t *p);
188 ngx_command_t *commands;
189
190 int (*init_module)(ngx_pool_t *p);
191 195
192 int (*translate_handler)(ngx_http_request_t *r); 196 int (*translate_handler)(ngx_http_request_t *r);
193 197
194 int (*output_header_filter) (ngx_http_request_t *r); 198 int (*output_header_filter) (ngx_http_request_t *r);
195 int (*next_output_header_filter) (ngx_http_request_t *r); 199 int (*next_output_header_filter) (ngx_http_request_t *r);
196 200
201 ngx_http_output_body_filter_p output_body_filter;
202 ngx_http_output_body_filter_p next_output_body_filter;
203
204 #if 0
197 int (*output_body_filter)(); 205 int (*output_body_filter)();
198 int (*next_output_body_filter) 206 int (*next_output_body_filter)
199 (ngx_http_request_t *r, ngx_chain_t *ch); 207 (ngx_http_request_t *r, ngx_chain_t *ch);
208 #endif
200 209
201 #if 0 210 #if 0
202 int (*next_output_body_filter)(int (**next_filter) 211 int (*next_output_body_filter)(int (**next_filter)
203 (ngx_http_request_t *r, ngx_chain_t *ch)); 212 (ngx_http_request_t *r, ngx_chain_t *ch));
204 #endif 213 #endif
205 } ngx_http_module_t; 214 } ngx_http_module_t;
206 215
207 216
208 #define NGX_HTTP_MODULE 0 217 #define NGX_HTTP_MODULE 0x80000000
209 218
219 #define NGX_HTTP_MODULE_TYPE 0x50545448 /* "HTTP" */
220
221
222 /* STUB */
210 #define ngx_get_module_loc_conf(r, module) r->loc_conf[module.index] 223 #define ngx_get_module_loc_conf(r, module) r->loc_conf[module.index]
211 #define ngx_get_module_ctx(r, module) r->ctx[module.index] 224 #define ngx_get_module_ctx(r, module) r->ctx[module.index]
225 /**/
226
227 #define ngx_http_get_module_srv_conf(r, module) r->srv_conf[module.index]
228 #define ngx_http_get_module_loc_conf(r, module) r->loc_conf[module.index]
229 #define ngx_http_get_module_ctx(r, module) r->ctx[module.index]
212 230
213 #define ngx_http_create_ctx(r, cx, module, size) \ 231 #define ngx_http_create_ctx(r, cx, module, size) \
214 do { \ 232 do { \
215 ngx_test_null(cx, ngx_pcalloc(r->pool, size), NGX_ERROR); \ 233 ngx_test_null(cx, ngx_pcalloc(r->pool, size), NGX_ERROR); \
216 r->ctx[module.index] = cx; \ 234 r->ctx[module.index] = cx; \