Mercurial > hg > nginx-mail
comparison src/http/ngx_http_core_module.c @ 194:003bd800ec2a NGINX_0_3_44
nginx 0.3.44
*) Feature: the "wait" parameter in the "include" SSI command.
*) Feature: the Ukrainian and Byelorussian characters were added to
koi-win conversion table.
*) Bugfix: in the SSI.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 04 May 2006 00:00:00 +0400 |
parents | af7f2341ecc5 |
children | e6da4931e0e0 |
comparison
equal
deleted
inserted
replaced
193:2a1394604ae9 | 194:003bd800ec2a |
---|---|
1166 ngx_http_core_srv_conf_t *cscf; | 1166 ngx_http_core_srv_conf_t *cscf; |
1167 ngx_http_postponed_request_t *pr, *p; | 1167 ngx_http_postponed_request_t *pr, *p; |
1168 | 1168 |
1169 sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t)); | 1169 sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t)); |
1170 if (sr == NULL) { | 1170 if (sr == NULL) { |
1171 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1171 return NGX_ERROR; |
1172 } | 1172 } |
1173 | 1173 |
1174 sr->signature = NGX_HTTP_MODULE; | 1174 sr->signature = NGX_HTTP_MODULE; |
1175 | 1175 |
1176 c = r->connection; | 1176 c = r->connection; |
1177 sr->connection = c; | 1177 sr->connection = c; |
1178 | 1178 |
1179 sr->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); | 1179 sr->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); |
1180 if (sr->ctx == NULL) { | 1180 if (sr->ctx == NULL) { |
1181 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1181 return NGX_ERROR; |
1182 } | 1182 } |
1183 | 1183 |
1184 if (ngx_list_init(&sr->headers_out.headers, r->pool, 20, | 1184 if (ngx_list_init(&sr->headers_out.headers, r->pool, 20, |
1185 sizeof(ngx_table_elt_t)) | 1185 sizeof(ngx_table_elt_t)) |
1186 == NGX_ERROR) | 1186 == NGX_ERROR) |
1187 { | 1187 { |
1188 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1188 return NGX_ERROR; |
1189 } | 1189 } |
1190 | 1190 |
1191 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); | 1191 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); |
1192 sr->main_conf = cscf->ctx->main_conf; | 1192 sr->main_conf = cscf->ctx->main_conf; |
1193 sr->srv_conf = cscf->ctx->srv_conf; | 1193 sr->srv_conf = cscf->ctx->srv_conf; |
1226 sr->unparsed_uri = r->unparsed_uri; | 1226 sr->unparsed_uri = r->unparsed_uri; |
1227 sr->method_name = r->method_name; | 1227 sr->method_name = r->method_name; |
1228 sr->http_protocol = r->http_protocol; | 1228 sr->http_protocol = r->http_protocol; |
1229 | 1229 |
1230 if (ngx_http_set_exten(sr) != NGX_OK) { | 1230 if (ngx_http_set_exten(sr) != NGX_OK) { |
1231 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1231 return NGX_ERROR; |
1232 } | 1232 } |
1233 | 1233 |
1234 sr->main = r->main; | 1234 sr->main = r->main; |
1235 sr->parent = r; | 1235 sr->parent = r; |
1236 sr->read_event_handler = ngx_http_request_empty_handler; | 1236 sr->read_event_handler = ngx_http_request_empty_handler; |
1249 | 1249 |
1250 sr->log_handler = r->log_handler; | 1250 sr->log_handler = r->log_handler; |
1251 | 1251 |
1252 pr = ngx_palloc(r->pool, sizeof(ngx_http_postponed_request_t)); | 1252 pr = ngx_palloc(r->pool, sizeof(ngx_http_postponed_request_t)); |
1253 if (pr == NULL) { | 1253 if (pr == NULL) { |
1254 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1254 return NGX_ERROR; |
1255 } | 1255 } |
1256 | 1256 |
1257 pr->request = sr; | 1257 pr->request = sr; |
1258 pr->out = NULL; | 1258 pr->out = NULL; |
1259 pr->next = NULL; | 1259 pr->next = NULL; |
1273 sr->main_filter_need_in_memory = r->main_filter_need_in_memory; | 1273 sr->main_filter_need_in_memory = r->main_filter_need_in_memory; |
1274 | 1274 |
1275 ngx_http_handler(sr); | 1275 ngx_http_handler(sr); |
1276 | 1276 |
1277 if (!c->destroyed) { | 1277 if (!c->destroyed) { |
1278 sr->fast_subrequest = 0; | |
1279 | |
1280 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, | 1278 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, |
1281 "http subrequest done \"%V?%V\"", uri, &sr->args); | 1279 "http subrequest done \"%V?%V\"", uri, &sr->args); |
1280 | |
1281 if (sr->fast_subrequest) { | |
1282 sr->fast_subrequest = 0; | |
1283 | |
1284 if (sr->done) { | |
1285 return NGX_OK; | |
1286 } | |
1287 } | |
1288 | |
1289 return NGX_AGAIN; | |
1282 } | 1290 } |
1283 | 1291 |
1284 return NGX_OK; | 1292 return NGX_OK; |
1285 } | 1293 } |
1286 | 1294 |