comparison src/http/ngx_http_special_response.c @ 638:692f4d4d7f10 NGINX_1_0_9

nginx 1.0.9 *) Change: now the 0x7F-0x1F characters are escaped as \xXX in an access_log. *) Change: now SIGWINCH signal works only in daemon mode. *) Feature: "proxy/fastcgi/scgi/uwsgi_ignore_headers" directives support the following additional values: X-Accel-Limit-Rate, X-Accel-Buffering, X-Accel-Charset. *) Feature: decrease of memory consumption if SSL is used. *) Feature: accept filters are now supported on NetBSD. *) Feature: the "uwsgi_buffering" and "scgi_buffering" directives. Thanks to Peter Smit. *) Bugfix: a segmentation fault occurred on start or while reconfiguration if the "ssl" directive was used at http level and there was no "ssl_certificate" defined. *) Bugfix: some UTF-8 characters were processed incorrectly. Thanks to Alexey Kuts. *) Bugfix: the ngx_http_rewrite_module directives specified at "server" level were executed twice if no matching locations were defined. *) Bugfix: a socket leak might occurred if "aio sendfile" was used. *) Bugfix: connections with fast clients might be closed after send_timeout if file AIO was used. *) Bugfix: in the ngx_http_autoindex_module. *) Bugfix: the module ngx_http_mp4_module did not support seeking on 32-bit platforms. *) Bugfix: non-cacheable responses might be cached if "proxy_cache_bypass" directive was used. Thanks to John Ferlito. *) Bugfix: cached responses with an empty body were returned incorrectly; the bug had appeared in 0.8.31. *) Bugfix: 201 responses of the ngx_http_dav_module were incorrect; the bug had appeared in 0.8.32. *) Bugfix: in the "return" directive. *) Bugfix: the "ssl_verify_client", "ssl_verify_depth", and "ssl_prefer_server_ciphers" directives might work incorrectly if SNI was used.
author Igor Sysoev <http://sysoev.ru>
date Tue, 01 Nov 2011 00:00:00 +0400
parents bb20316269e4
children ad25218fd14b
comparison
equal deleted inserted replaced
637:ea7441793bba 638:692f4d4d7f10
373 case NGX_HTTP_INTERNAL_SERVER_ERROR: 373 case NGX_HTTP_INTERNAL_SERVER_ERROR:
374 r->keepalive = 0; 374 r->keepalive = 0;
375 } 375 }
376 } 376 }
377 377
378 if (r->lingering_close == 1) { 378 if (r->lingering_close) {
379 switch (error) { 379 switch (error) {
380 case NGX_HTTP_BAD_REQUEST: 380 case NGX_HTTP_BAD_REQUEST:
381 case NGX_HTTP_TO_HTTPS: 381 case NGX_HTTP_TO_HTTPS:
382 case NGX_HTTPS_CERT_ERROR: 382 case NGX_HTTPS_CERT_ERROR:
383 case NGX_HTTPS_NO_CERT: 383 case NGX_HTTPS_NO_CERT:
419 } 419 }
420 420
421 if (error == NGX_HTTP_CREATED) { 421 if (error == NGX_HTTP_CREATED) {
422 /* 201 */ 422 /* 201 */
423 err = 0; 423 err = 0;
424 r->header_only = 1;
425 424
426 } else if (error == NGX_HTTP_NO_CONTENT) { 425 } else if (error == NGX_HTTP_NO_CONTENT) {
427 /* 204 */ 426 /* 204 */
428 err = 0; 427 err = 0;
429 428
581 580
582 location->hash = 1; 581 location->hash = 1;
583 ngx_str_set(&location->key, "Location"); 582 ngx_str_set(&location->key, "Location");
584 location->value = uri; 583 location->value = uri;
585 584
585 ngx_http_clear_location(r);
586
586 r->headers_out.location = location; 587 r->headers_out.location = location;
587 588
588 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 589 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
589 590
590 if (clcf->msie_refresh && r->headers_in.msie) { 591 if (clcf->msie_refresh && r->headers_in.msie) {
634 r->headers_out.content_type_len = sizeof("text/html") - 1; 635 r->headers_out.content_type_len = sizeof("text/html") - 1;
635 ngx_str_set(&r->headers_out.content_type, "text/html"); 636 ngx_str_set(&r->headers_out.content_type, "text/html");
636 r->headers_out.content_type_lowcase = NULL; 637 r->headers_out.content_type_lowcase = NULL;
637 638
638 } else { 639 } else {
639 r->headers_out.content_length_n = -1; 640 r->headers_out.content_length_n = 0;
640 } 641 }
641 642
642 if (r->headers_out.content_length) { 643 if (r->headers_out.content_length) {
643 r->headers_out.content_length->hash = 0; 644 r->headers_out.content_length->hash = 0;
644 r->headers_out.content_length = NULL; 645 r->headers_out.content_length = NULL;
652 if (rc == NGX_ERROR || r->header_only) { 653 if (rc == NGX_ERROR || r->header_only) {
653 return rc; 654 return rc;
654 } 655 }
655 656
656 if (ngx_http_error_pages[err].len == 0) { 657 if (ngx_http_error_pages[err].len == 0) {
657 return NGX_OK; 658 return ngx_http_send_special(r, NGX_HTTP_LAST);
658 } 659 }
659 660
660 b = ngx_calloc_buf(r->pool); 661 b = ngx_calloc_buf(r->pool);
661 if (b == NULL) { 662 if (b == NULL) {
662 return NGX_ERROR; 663 return NGX_ERROR;