Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-02-01 19:18:55 +0300
committerIgor Sysoev <igor@sysoev.ru>2011-02-01 19:18:55 +0300
commit64d5f9ba268f48170ac6a0d188d934de442072fe (patch)
treebaa8e62160a6963d3eac76801d026bc7bf8c2dce /src
parenteb1a344dd309446b3f7bbcbf779c1524499e83fc (diff)
fix "error_page 497 https://" case
patch by Maxim Dounin the bug has been introduced in r3782
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_special_response.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index ed87fd068..0f08d987e 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -570,7 +570,14 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
return NGX_ERROR;
}
- r->err_status = overwrite > 0 ? overwrite : NGX_HTTP_MOVED_TEMPORARILY;
+ if (overwrite >= NGX_HTTP_MOVED_PERMANENTLY
+ && overwrite <= NGX_HTTP_SEE_OTHER)
+ {
+ r->err_status = overwrite;
+
+ } else {
+ r->err_status = NGX_HTTP_MOVED_TEMPORARILY;
+ }
location->hash = 1;
ngx_str_set(&location->key, "Location");