aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-06-18 14:28:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-06-18 14:28:50 +0000
commitad0d2fced478225bfafa002a98482cf55debc7d5 (patch)
tree2e0ddcbf0f9c0001212fb0cda24d4a9da100b75a /src
parentbd9eda998644fad6b01f545edb3f72a03dc7fb3a (diff)
downloadnginx-ad0d2fced478225bfafa002a98482cf55debc7d5.tar.gz
nginx-ad0d2fced478225bfafa002a98482cf55debc7d5.zip
fix segfault if there is error_page 401, proxy_intercept_errors is on
and backend does not return "WWW-Authenticate" header
Diffstat (limited to 'src')
-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 edd48ac9f..16a027a8a 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1606,8 +1606,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) {