comparison src/http/ngx_http_core_module.c @ 675:e924670896ab release-0.3.59

nginx-0.3.59-RELEASE import *) Feature: now is possible to do several redirection using the "error_page" directive. *) Bugfix: the "dav_access" directive did not support three parameters. *) Bugfix: the "error_page" directive did not changes the "Content-Type" header line after the "X-Accel-Redirect" was used; the bug had appeared in 0.3.58.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 16 Aug 2006 13:09:33 +0000
parents b80f94fa2197
children 921a7ce4baf4
comparison
equal deleted inserted replaced
674:c4b2ba082d99 675:e924670896ab
462 { 462 {
463 r->connection->log->action = NULL; 463 r->connection->log->action = NULL;
464 464
465 r->connection->unexpected_eof = 0; 465 r->connection->unexpected_eof = 0;
466 466
467 if (r->err_ctx == NULL) { 467 if (!r->internal) {
468 switch (r->headers_in.connection_type) { 468 switch (r->headers_in.connection_type) {
469 case 0: 469 case 0:
470 if (r->http_version > NGX_HTTP_VERSION_10) { 470 if (r->http_version > NGX_HTTP_VERSION_10) {
471 r->keepalive = 1; 471 r->keepalive = 1;
472 } else { 472 } else {
1339 1339
1340 if (ngx_http_set_exten(r) != NGX_OK) { 1340 if (ngx_http_set_exten(r) != NGX_OK) {
1341 return NGX_HTTP_INTERNAL_SERVER_ERROR; 1341 return NGX_HTTP_INTERNAL_SERVER_ERROR;
1342 } 1342 }
1343 1343
1344 if (r->err_ctx) { 1344 /* clear the modules contexts */
1345 1345 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
1346 /* allocate the new module's contexts */
1347
1348 r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module);
1349 if (r->ctx == NULL) {
1350 return NGX_HTTP_INTERNAL_SERVER_ERROR;
1351 }
1352
1353 } else {
1354
1355 /* clear the modules contexts */
1356
1357 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
1358 }
1359 1346
1360 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); 1347 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
1361 r->loc_conf = cscf->ctx->loc_conf; 1348 r->loc_conf = cscf->ctx->loc_conf;
1362 1349
1363 ngx_http_update_location_config(r); 1350 ngx_http_update_location_config(r);