aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-06-22 09:32:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-06-22 09:32:03 +0000
commitd0f46cb6bbefc38c99ee861255e45a88873a6966 (patch)
tree8a375e029cdef2fc4d1e3a863f1a4ee8dc29246d
parent942ccf676e35273e06c7ecd3c6934e683aec49dd (diff)
downloadnginx-d0f46cb6bbefc38c99ee861255e45a88873a6966.tar.gz
nginx-d0f46cb6bbefc38c99ee861255e45a88873a6966.zip
merge r2954:
fix segfault if there is error_page 401, proxy_intercept_errors is on and backend does not return "WWW-Authenticate" header
-rw-r--r--src/http/ngx_http_upstream.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 67ae1bc1c..c04e643fb 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1573,8 +1573,9 @@ ngx_http_upstream_intercept_errors(ngx_http_request_t *r,
if (err_page[i].status == status) {
- if (status == NGX_HTTP_UNAUTHORIZED) {
-
+ if (status == NGX_HTTP_UNAUTHORIZED
+ && u->headers_in.www_authenticate)
+ {
h = ngx_list_push(&r->headers_out.headers);
if (h == NULL) {