comparison src/http/ngx_http_request.c @ 632:5b73504dd4ba NGINX_1_1_0

nginx 1.1.0 *) Feature: cache loader run time decrease. *) Feature: "loader_files", "loader_sleep", and "loader_threshold" options of the "proxy/fastcgi/scgi/uwsgi_cache_path" directives. *) Feature: loading time decrease of configuration with large number of HTTPS sites. *) Feature: now nginx supports ECDHE key exchange ciphers. Thanks to Adrian Kotelba. *) Feature: the "lingering_close" directive. Thanks to Maxim Dounin. *) Bugfix: in closing connection for pipelined requests. Thanks to Maxim Dounin. *) Bugfix: nginx did not disable gzipping if client sent "gzip;q=0" in "Accept-Encoding" request header line. *) Bugfix: in timeout in unbuffered proxied mode. Thanks to Maxim Dounin. *) Bugfix: memory leaks when a "proxy_pass" directive contains variables and proxies to an HTTPS backend. Thanks to Maxim Dounin. *) Bugfix: in parameter validaiton of a "proxy_pass" directive with variables. Thanks to Lanshun Zhou. *) Bugfix: SSL did not work on QNX. Thanks to Maxim Dounin. *) Bugfix: SSL modules could not be built by gcc 4.6 without --with-debug option.
author Igor Sysoev <http://sysoev.ru>
date Mon, 01 Aug 2011 00:00:00 +0400
parents b9763778e212
children 943566b4d82e
comparison
equal deleted inserted replaced
631:9b978fa3cd33 632:5b73504dd4ba
1437 1437
1438 if (msie[6] == '.') { 1438 if (msie[6] == '.') {
1439 1439
1440 switch (msie[5]) { 1440 switch (msie[5]) {
1441 case '4': 1441 case '4':
1442 r->headers_in.msie4 = 1;
1443 /* fall through */
1444 case '5': 1442 case '5':
1445 r->headers_in.msie6 = 1; 1443 r->headers_in.msie6 = 1;
1446 break; 1444 break;
1447 case '6': 1445 case '6':
1448 if (ngx_strstrn(msie + 8, "SV1", 3 - 1) == NULL) { 1446 if (ngx_strstrn(msie + 8, "SV1", 3 - 1) == NULL) {
1461 } 1459 }
1462 1460
1463 if (ngx_strstrn(user_agent, "Opera", 5 - 1)) { 1461 if (ngx_strstrn(user_agent, "Opera", 5 - 1)) {
1464 r->headers_in.opera = 1; 1462 r->headers_in.opera = 1;
1465 r->headers_in.msie = 0; 1463 r->headers_in.msie = 0;
1466 r->headers_in.msie4 = 0;
1467 r->headers_in.msie6 = 0; 1464 r->headers_in.msie6 = 0;
1468 } 1465 }
1469 1466
1470 if (!r->headers_in.msie && !r->headers_in.opera) { 1467 if (!r->headers_in.msie && !r->headers_in.opera) {
1471 1468
2124 2121
2125 if (r->main->count != 1) { 2122 if (r->main->count != 1) {
2126 2123
2127 if (r->discard_body) { 2124 if (r->discard_body) {
2128 r->read_event_handler = ngx_http_discarded_request_body_handler; 2125 r->read_event_handler = ngx_http_discarded_request_body_handler;
2126 ngx_add_timer(r->connection->read, clcf->lingering_timeout);
2129 2127
2130 if (r->lingering_time == 0) { 2128 if (r->lingering_time == 0) {
2131 r->lingering_time = ngx_time() 2129 r->lingering_time = ngx_time()
2132 + (time_t) (clcf->lingering_time / 1000); 2130 + (time_t) (clcf->lingering_time / 1000);
2133 ngx_add_timer(r->connection->read, clcf->lingering_timeout);
2134 } 2131 }
2135 } 2132 }
2136 2133
2137 ngx_http_close_request(r, 0); 2134 ngx_http_close_request(r, 0);
2138 return; 2135 return;
2143 && r->keepalive 2140 && r->keepalive
2144 && clcf->keepalive_timeout > 0) 2141 && clcf->keepalive_timeout > 0)
2145 { 2142 {
2146 ngx_http_set_keepalive(r); 2143 ngx_http_set_keepalive(r);
2147 return; 2144 return;
2148 2145 }
2149 } else if (r->lingering_close && clcf->lingering_timeout > 0) { 2146
2147 if (clcf->lingering_close == NGX_HTTP_LINGERING_ALWAYS
2148 || (clcf->lingering_close == NGX_HTTP_LINGERING_ON
2149 && (r->lingering_close
2150 || r->header_in->pos < r->header_in->last
2151 || r->connection->read->ready)))
2152 {
2150 ngx_http_set_lingering_close(r); 2153 ngx_http_set_lingering_close(r);
2151 return; 2154 return;
2152 } 2155 }
2153 2156
2154 ngx_http_close_request(r, 0); 2157 ngx_http_close_request(r, 0);
2770 2773
2771 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, 2774 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
2772 "http lingering close handler"); 2775 "http lingering close handler");
2773 2776
2774 if (rev->timedout) { 2777 if (rev->timedout) {
2775 c->timedout = 1;
2776 ngx_http_close_request(r, 0); 2778 ngx_http_close_request(r, 0);
2777 return; 2779 return;
2778 } 2780 }
2779 2781
2780 timer = (ngx_msec_t) (r->lingering_time - ngx_time()); 2782 timer = (ngx_msec_t) (r->lingering_time - ngx_time());