comparison src/http/ngx_http_special_response.c @ 642:d3cf6c6b0043 NGINX_1_1_5

nginx 1.1.5 *) Feature: the "uwsgi_buffering" and "scgi_buffering" directives. Thanks to Peter Smit. *) Bugfix: non-cacheable responses might be cached if "proxy_cache_bypass" directive was used. Thanks to John Ferlito. *) Bugfix: in HTTP/1.1 support in the ngx_http_proxy_module. *) 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_session_cache builtin" directive caused segmentation fault; the bug had appeared in 1.1.1.
author Igor Sysoev <http://sysoev.ru>
date Wed, 05 Oct 2011 00:00:00 +0400
parents bb20316269e4
children 6f21ae02fb01
comparison
equal deleted inserted replaced
641:6c19b251b926 642:d3cf6c6b0043
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
634 r->headers_out.content_type_len = sizeof("text/html") - 1; 633 r->headers_out.content_type_len = sizeof("text/html") - 1;
635 ngx_str_set(&r->headers_out.content_type, "text/html"); 634 ngx_str_set(&r->headers_out.content_type, "text/html");
636 r->headers_out.content_type_lowcase = NULL; 635 r->headers_out.content_type_lowcase = NULL;
637 636
638 } else { 637 } else {
639 r->headers_out.content_length_n = -1; 638 r->headers_out.content_length_n = 0;
640 } 639 }
641 640
642 if (r->headers_out.content_length) { 641 if (r->headers_out.content_length) {
643 r->headers_out.content_length->hash = 0; 642 r->headers_out.content_length->hash = 0;
644 r->headers_out.content_length = NULL; 643 r->headers_out.content_length = NULL;
652 if (rc == NGX_ERROR || r->header_only) { 651 if (rc == NGX_ERROR || r->header_only) {
653 return rc; 652 return rc;
654 } 653 }
655 654
656 if (ngx_http_error_pages[err].len == 0) { 655 if (ngx_http_error_pages[err].len == 0) {
657 return NGX_OK; 656 return ngx_http_send_special(r, NGX_HTTP_LAST);
658 } 657 }
659 658
660 b = ngx_calloc_buf(r->pool); 659 b = ngx_calloc_buf(r->pool);
661 if (b == NULL) { 660 if (b == NULL) {
662 return NGX_ERROR; 661 return NGX_ERROR;