comparison src/http/ngx_http_request.c @ 364:a39aab45a53f NGINX_0_6_26

nginx 0.6.26 *) Bugfix: the "proxy_store" and "fastcgi_store" directives did not check a response length. *) Bugfix: a segmentation fault occurred in worker process, if big value was used in a "expires" directive. Thanks to Joaquin Cuenca Abela. *) Bugfix: nginx incorrectly detected cache line size on Pentium 4. Thanks to Gena Makhomed. *) Bugfix: in proxied or FastCGI subrequests a client original method was used instead of the GET method. *) Bugfix: socket leak in HTTPS mode if deferred accept was used. Thanks to Ben Maurer. *) Bugfix: nginx issued the bogus error message "SSL_shutdown() failed (SSL: )"; bug appeared in 0.6.23. *) Bugfix: in HTTPS mode requests might fail with the "bad write retry" error; bug appeared in 0.6.23.
author Igor Sysoev <http://sysoev.ru>
date Mon, 11 Feb 2008 00:00:00 +0300
parents 54fad6c4b555
children babd3d9efb62
comparison
equal deleted inserted replaced
363:6999caedb665 364:a39aab45a53f
477 } 477 }
478 478
479 n = recv(c->fd, (char *) buf, 1, MSG_PEEK); 479 n = recv(c->fd, (char *) buf, 1, MSG_PEEK);
480 480
481 if (n == -1 && ngx_socket_errno == NGX_EAGAIN) { 481 if (n == -1 && ngx_socket_errno == NGX_EAGAIN) {
482
483 if (!rev->timer_set) {
484 ngx_add_timer(rev, c->listening->post_accept_timeout);
485 }
486
487 if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
488 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
489 }
490
482 return; 491 return;
483 } 492 }
484 493
485 if (n == 1) { 494 if (n == 1) {
486 if (buf[0] == 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) { 495 if (buf[0] == 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) {
983 } else { 992 } else {
984 n = NGX_AGAIN; 993 n = NGX_AGAIN;
985 } 994 }
986 995
987 if (n == NGX_AGAIN) { 996 if (n == NGX_AGAIN) {
988 if (!r->header_timeout_set) { 997 if (!rev->timer_set) {
989 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); 998 cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
990 ngx_add_timer(rev, cscf->client_header_timeout); 999 ngx_add_timer(rev, cscf->client_header_timeout);
991 r->header_timeout_set = 1;
992 } 1000 }
993 1001
994 if (ngx_handle_read_event(rev, 0) == NGX_ERROR) { 1002 if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
995 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 1003 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
996 return NGX_ERROR; 1004 return NGX_ERROR;