comparison src/http/ngx_http_core_module.c @ 620:b4dcae568a2a NGINX_1_0_0

nginx 1.0.0 *) Bugfix: a cache manager might hog CPU after reload. Thanks to Maxim Dounin. *) Bugfix: an "image_filter crop" directive worked incorrectly coupled with an "image_filter rotate 180" directive. *) Bugfix: a "satisfy any" directive disabled custom 401 error page.
author Igor Sysoev <http://sysoev.ru>
date Tue, 12 Apr 2011 00:00:00 +0400
parents ce857f6b74a7
children 8dc007eddbcf
comparison
equal deleted inserted replaced
619:c4e0de226b0b 620:b4dcae568a2a
1106 1106
1107 ngx_int_t 1107 ngx_int_t
1108 ngx_http_core_post_access_phase(ngx_http_request_t *r, 1108 ngx_http_core_post_access_phase(ngx_http_request_t *r,
1109 ngx_http_phase_handler_t *ph) 1109 ngx_http_phase_handler_t *ph)
1110 { 1110 {
1111 ngx_int_t access_code;
1112
1111 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1113 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1112 "post access phase: %ui", r->phase_handler); 1114 "post access phase: %ui", r->phase_handler);
1113 1115
1114 if (r->access_code) { 1116 access_code = r->access_code;
1115 1117
1116 if (r->access_code == NGX_HTTP_FORBIDDEN) { 1118 if (access_code) {
1119 if (access_code == NGX_HTTP_FORBIDDEN) {
1117 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 1120 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1118 "access forbidden by rule"); 1121 "access forbidden by rule");
1119 } 1122 }
1120 1123
1121 ngx_http_finalize_request(r, r->access_code); 1124 r->access_code = 0;
1125 ngx_http_finalize_request(r, access_code);
1122 return NGX_OK; 1126 return NGX_OK;
1123 } 1127 }
1124 1128
1125 r->phase_handler++; 1129 r->phase_handler++;
1126 return NGX_AGAIN; 1130 return NGX_AGAIN;
1219 path.len = e.pos - path.data; 1223 path.len = e.pos - path.data;
1220 1224
1221 *e.pos = '\0'; 1225 *e.pos = '\0';
1222 1226
1223 if (alias && ngx_strncmp(name, clcf->name.data, alias) == 0) { 1227 if (alias && ngx_strncmp(name, clcf->name.data, alias) == 0) {
1224 ngx_memcpy(name, name + alias, len - alias); 1228 ngx_memmove(name, name + alias, len - alias);
1225 path.len -= alias; 1229 path.len -= alias;
1226 } 1230 }
1227 } 1231 }
1228 1232
1229 test_dir = tf->test_dir; 1233 test_dir = tf->test_dir;