Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_special_response.c @ 104:146eff53ab60 NGINX_0_2_6
nginx 0.2.6
*) Change: while using load-balancing the time before the failed
backend retry was decreased from 60 to 10 seconds.
*) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI
now passed, if the URI part is omitted in "proxy_pass" directive.
*) Feature: the "error_page" directive supports redirects and allows
more flexible to change an error code.
*) Change: the charset in the "Content-Type" header line now is ignored
in proxied subrequests.
*) Bugfix: if the URI was changed in the "if" block and request did not
found new configuration, then the ngx_http_rewrite_module rules ran
again.
*) Bugfix: if the "set" directive set the ngx_http_geo_module variable
in some configuration part, the this variable was not available in
other configuration parts and the "using uninitialized variable"
error was occurred; bug appeared in 0.2.2.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 05 Oct 2005 00:00:00 +0400 |
parents | f63280c59dd5 |
children | df17fbafec8f |
comparison
equal
deleted
inserted
replaced
103:acdd83ee07cb | 104:146eff53ab60 |
---|---|
281 err_page = clcf->error_pages->elts; | 281 err_page = clcf->error_pages->elts; |
282 | 282 |
283 for (i = 0; i < clcf->error_pages->nelts; i++) { | 283 for (i = 0; i < clcf->error_pages->nelts; i++) { |
284 | 284 |
285 if (err_page[i].status == error) { | 285 if (err_page[i].status == error) { |
286 | 286 r->err_status = err_page[i].overwrite; |
287 if (err_page[i].overwrite) { | 287 r->err_ctx = r->ctx; |
288 r->err_status = err_page[i].overwrite; | 288 |
289 r->method = NGX_HTTP_GET; | |
290 | |
291 if (err_page[i].uri.data[0] == '/') { | |
292 return ngx_http_internal_redirect(r, &err_page[i].uri, | |
293 NULL); | |
294 } | |
295 | |
296 r->headers_out.location = | |
297 ngx_list_push(&r->headers_out.headers); | |
298 | |
299 if (r->headers_out.location) { | |
300 r->err_status = NGX_HTTP_MOVED_TEMPORARILY; | |
301 error = NGX_HTTP_MOVED_TEMPORARILY; | |
302 | |
303 r->headers_out.location->hash = 1; | |
304 r->headers_out.location->key.len = sizeof("Location") - 1; | |
305 r->headers_out.location->key.data = (u_char *) "Location"; | |
306 r->headers_out.location->value = err_page[i].uri; | |
307 | |
289 } else { | 308 } else { |
290 r->err_status = error; | 309 error = NGX_HTTP_INTERNAL_SERVER_ERROR; |
291 } | 310 } |
292 | |
293 r->err_ctx = r->ctx; | |
294 | |
295 r->method = NGX_HTTP_GET; | |
296 | |
297 return ngx_http_internal_redirect(r, &err_page[i].uri, NULL); | |
298 } | 311 } |
299 } | 312 } |
300 } | 313 } |
301 | 314 |
302 if (error == NGX_HTTP_NO_CONTENT) { | 315 if (error == NGX_HTTP_NO_CONTENT) { |