Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_special_response.c @ 224:9909a161eb28 NGINX_0_3_59
nginx 0.3.59
*) Feature: now is possible to do several redirection using the
"error_page" directive.
*) Bugfix: the "dav_access" directive did not support three parameters.
*) Bugfix: the "error_page" directive did not changes the
"Content-Type" header line after the "X-Accel-Redirect" was used;
bug appeared in 0.3.58.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 16 Aug 2006 00:00:00 +0400 |
parents | dd6c66b5b0e2 |
children | 21f2ace7c936 |
comparison
equal
deleted
inserted
replaced
223:c3b6f8ef140b | 224:9909a161eb28 |
---|---|
334 case NGX_HTTPS_NO_CERT: | 334 case NGX_HTTPS_NO_CERT: |
335 r->lingering_close = 0; | 335 r->lingering_close = 0; |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 r->headers_out.content_type.len = 0; | |
340 | |
339 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 341 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
340 | 342 |
341 if (r->err_ctx == NULL && clcf->error_pages) { | 343 if (clcf->error_pages) { |
342 | 344 |
343 err_page = clcf->error_pages->elts; | 345 err_page = clcf->error_pages->elts; |
344 | 346 |
345 for (i = 0; i < clcf->error_pages->nelts; i++) { | 347 for (i = 0; i < clcf->error_pages->nelts; i++) { |
346 | 348 |
347 if (err_page[i].status == error) { | 349 if (err_page[i].status == error) { |
348 r->err_status = err_page[i].overwrite; | 350 r->err_status = err_page[i].overwrite; |
349 r->err_ctx = r->ctx; | |
350 | 351 |
351 r->method = NGX_HTTP_GET; | 352 r->method = NGX_HTTP_GET; |
352 | 353 |
353 uri = &err_page[i].uri; | 354 uri = &err_page[i].uri; |
354 | 355 |
368 | 369 |
369 r->headers_out.location = | 370 r->headers_out.location = |
370 ngx_list_push(&r->headers_out.headers); | 371 ngx_list_push(&r->headers_out.headers); |
371 | 372 |
372 if (r->headers_out.location) { | 373 if (r->headers_out.location) { |
374 error = NGX_HTTP_MOVED_TEMPORARILY; | |
375 | |
373 r->err_status = NGX_HTTP_MOVED_TEMPORARILY; | 376 r->err_status = NGX_HTTP_MOVED_TEMPORARILY; |
374 error = NGX_HTTP_MOVED_TEMPORARILY; | |
375 | 377 |
376 r->headers_out.location->hash = 1; | 378 r->headers_out.location->hash = 1; |
377 r->headers_out.location->key.len = sizeof("Location") - 1; | 379 r->headers_out.location->key.len = sizeof("Location") - 1; |
378 r->headers_out.location->key.data = (u_char *) "Location"; | 380 r->headers_out.location->key.data = (u_char *) "Location"; |
379 r->headers_out.location->value = *uri; | 381 r->headers_out.location->value = *uri; |