comparison src/http/ngx_http_upstream.c @ 498:ef5c97e49c35 NGINX_0_7_61

nginx 0.7.61 *) Bugfix: nginx could not be built on MacOSX 10.6. the bug had appeared in 0.8.2. *) Bugfix: nginx could not be built --without-http-cache; the bug had appeared in 0.7.60. *) Bugfix: a segmentation fault occurred in worker process, if a backend 401 error was intercepted and the backend did not set the "WWW-Authenticate" response header line. Thanks to Eugene Mychlo.
author Igor Sysoev <http://sysoev.ru>
date Mon, 22 Jun 2009 00:00:00 +0400
parents 116d5de7cbb6
children ed3d382670c7
comparison
equal deleted inserted replaced
497:b0914e65af8e 498:ef5c97e49c35
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);
4084 && conf->pass_headers == NGX_CONF_UNSET_PTR) 4085 && conf->pass_headers == NGX_CONF_UNSET_PTR)
4085 { 4086 {
4086 conf->hide_headers_hash = prev->hide_headers_hash; 4087 conf->hide_headers_hash = prev->hide_headers_hash;
4087 4088
4088 if (conf->hide_headers_hash.buckets 4089 if (conf->hide_headers_hash.buckets
4089 && ((conf->cache == NULL) == (prev->cache == NULL))) 4090 #if (NGX_HTTP_CACHE)
4091 && ((conf->cache == NULL) == (prev->cache == NULL))
4092 #endif
4093 )
4090 { 4094 {
4091 return NGX_OK; 4095 return NGX_OK;
4092 } 4096 }
4093 4097
4094 conf->hide_headers = prev->hide_headers; 4098 conf->hide_headers = prev->hide_headers;