Mercurial > hg > nginx
changeset 2953:aa12525236da
fix segfault if there is error_page 401, proxy_intercept_errors is on
and backend does not return "WWW-Authenticate" header
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 18 Jun 2009 14:28:50 +0000 |
parents | 0998606fbfd4 |
children | c98da980514a |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Thu Jun 18 13:34:47 2009 +0000 +++ b/src/http/ngx_http_upstream.c Thu Jun 18 14:28:50 2009 +0000 @@ -1606,8 +1606,9 @@ 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) {