comparison src/http/ngx_http_core_module.h @ 201:267ea1d98683

nginx-0.0.1-2003-11-30-23:03:18 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 30 Nov 2003 20:03:18 +0000
parents 8dee38ea9117
children 00cafae0bdf1
comparison
equal deleted inserted replaced
200:abeaebe0a33c 201:267ea1d98683
15 ngx_str_t file_name; 15 ngx_str_t file_name;
16 int line; 16 int line;
17 } ngx_http_listen_t; 17 } ngx_http_listen_t;
18 18
19 19
20 typedef enum {
21 NGX_HTTP_REWRITE_PHASE = 0,
22 NGX_HTTP_FIND_CONFIG_PHASE,
23 NGX_HTTP_CONTENT_PHASE,
24 NGX_HTTP_LAST_PHASE
25 } ngx_http_phases;
26
27
20 typedef struct { 28 typedef struct {
21 ngx_array_t handlers; 29 ngx_array_t handlers;
22 int type; /* NGX_OK, NGX_DECLINED */ 30 int type; /* NGX_OK, NGX_DECLINED */
23 ngx_http_handler_pt post_handler;
24 } ngx_http_phase_t; 31 } ngx_http_phase_t;
25 32
26 #define NGX_HTTP_REWRITE_PHASE 0
27 #define NGX_HTTP_TRANSLATE_PHASE 1
28 #define NGX_HTTP_LAST_PHASE 2
29 33
30 typedef struct { 34 typedef struct {
31 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ 35 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
32 36
33 ngx_http_phase_t phases[NGX_HTTP_LAST_PHASE]; 37 ngx_http_phase_t phases[NGX_HTTP_LAST_PHASE];
126 ngx_msec_t lingering_timeout; /* lingering_timeout */ 130 ngx_msec_t lingering_timeout; /* lingering_timeout */
127 131
128 int msie_padding; /* msie_padding */ 132 int msie_padding; /* msie_padding */
129 ngx_array_t *error_pages; /* error_page */ 133 ngx_array_t *error_pages; /* error_page */
130 134
135 ngx_http_cache_hash_t *open_files;
136
131 ngx_regex_t *regex; 137 ngx_regex_t *regex;
132 138
133 unsigned exact_match:1; 139 unsigned exact_match:1;
134
135 unsigned auto_redirect:1; 140 unsigned auto_redirect:1;
136 141
137 ngx_log_t *err_log; 142 ngx_log_t *err_log;
138 } ngx_http_core_loc_conf_t; 143 } ngx_http_core_loc_conf_t;
139
140
141
142
143 #if 0
144 typedef struct {
145 int dummy;
146 } ngx_http_core_conf_t;
147 #endif
148
149
150 #if 0
151 #define ngx_http_set_loc_handler(conf_ctx, ngx_http_handler) \
152 { \
153 ngx_http_conf_ctx_t *cx = conf_ctx; \
154 ngx_http_core_loc_conf_t *lcf; \
155 lcf = cx->loc_conf[ngx_http_core_module_ctx.index]; \
156 lcf->handler = ngx_http_handler; \
157 }
158 #endif
159 144
160 145
161 extern ngx_http_module_t ngx_http_core_module_ctx; 146 extern ngx_http_module_t ngx_http_core_module_ctx;
162 extern ngx_module_t ngx_http_core_module; 147 extern ngx_module_t ngx_http_core_module;
163 148
166 151
167 152
168 int ngx_http_find_location_config(ngx_http_request_t *r); 153 int ngx_http_find_location_config(ngx_http_request_t *r);
169 int ngx_http_core_translate_handler(ngx_http_request_t *r); 154 int ngx_http_core_translate_handler(ngx_http_request_t *r);
170 155
156 ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r);
157
171 int ngx_http_internal_redirect(ngx_http_request_t *r, 158 int ngx_http_internal_redirect(ngx_http_request_t *r,
172 ngx_str_t *uri, ngx_str_t *args); 159 ngx_str_t *uri, ngx_str_t *args);
173 int ngx_http_error(ngx_http_request_t *r, int error); 160 int ngx_http_error(ngx_http_request_t *r, int error);
174 161
175 162