Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 2963:b0c1ce16b5bd stable-0.7
merge r2954:
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 | Mon, 22 Jun 2009 09:32:03 +0000 |
parents | 31526449835f |
children | 4f28e63e42b4 |
comparison
equal
deleted
inserted
replaced
2962:19f9a5eae383 | 2963:b0c1ce16b5bd |
---|---|
1571 err_page = clcf->error_pages->elts; | 1571 err_page = clcf->error_pages->elts; |
1572 for (i = 0; i < clcf->error_pages->nelts; i++) { | 1572 for (i = 0; i < clcf->error_pages->nelts; i++) { |
1573 | 1573 |
1574 if (err_page[i].status == status) { | 1574 if (err_page[i].status == status) { |
1575 | 1575 |
1576 if (status == NGX_HTTP_UNAUTHORIZED) { | 1576 if (status == NGX_HTTP_UNAUTHORIZED |
1577 | 1577 && u->headers_in.www_authenticate) |
1578 { | |
1578 h = ngx_list_push(&r->headers_out.headers); | 1579 h = ngx_list_push(&r->headers_out.headers); |
1579 | 1580 |
1580 if (h == NULL) { | 1581 if (h == NULL) { |
1581 ngx_http_upstream_finalize_request(r, u, | 1582 ngx_http_upstream_finalize_request(r, u, |
1582 NGX_HTTP_INTERNAL_SERVER_ERROR); | 1583 NGX_HTTP_INTERNAL_SERVER_ERROR); |