aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-04-11 14:17:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-04-11 14:17:31 +0000
commitd80bcbcd0fef16a9bf5602fcba5ffa87f5074919 (patch)
tree926b3b35887305294566d50f3999eaaad3b067ac /src
parent711eeb851438331e87068ea3139df9b415f9ca6a (diff)
downloadnginx-d80bcbcd0fef16a9bf5602fcba5ffa87f5074919.tar.gz
nginx-d80bcbcd0fef16a9bf5602fcba5ffa87f5074919.zip
"satisfy any" disabled custom 401 error page
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 693a3cb32..c8edf9580 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -1108,17 +1108,21 @@ ngx_int_t
ngx_http_core_post_access_phase(ngx_http_request_t *r,
ngx_http_phase_handler_t *ph)
{
+ ngx_int_t access_code;
+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"post access phase: %ui", r->phase_handler);
- if (r->access_code) {
+ access_code = r->access_code;
- if (r->access_code == NGX_HTTP_FORBIDDEN) {
+ if (access_code) {
+ if (access_code == NGX_HTTP_FORBIDDEN) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"access forbidden by rule");
}
- ngx_http_finalize_request(r, r->access_code);
+ r->access_code = 0;
+ ngx_http_finalize_request(r, access_code);
return NGX_OK;
}