diff src/http/ngx_http_core_module.c @ 32:da8c190bdaba NGINX_0_1_16

nginx 0.1.16 *) Bugfix: if the response were transferred by chunks, then on the HEAD request the final chunk was issued. *) Bugfix: the "Connection: keep-alive" header were issued, even if the keepalive_timeout directive forbade the keep-alive use. *) Bugfix: the errors in the ngx_http_fastcgi_module caused the segmentation faults. *) Bugfix: the compressed response encrypted by SSL may not transferred complete. *) Bugfix: the TCP-specific TCP_NODELAY, TCP_NOPSUH, and TCP_CORK options, are not used for the unix domain sockets. *) Feature: the rewrite directive supports the arguments rewriting. *) Bugfix: the response code 400 was returned for the POST request with the "Content-Length: 0" header; bug appeared in 0.1.14.
author Igor Sysoev <http://sysoev.ru>
date Tue, 25 Jan 2005 00:00:00 +0300
parents e1ada20fc595
children aab2ea7c0458
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -351,13 +351,10 @@ ngx_module_t  ngx_http_core_module = {
 
 void ngx_http_handler(ngx_http_request_t *r)
 {
-    ngx_http_log_ctx_t  *ctx;
+    r->connection->log->action = NULL;
 
     r->connection->unexpected_eof = 0;
 
-    ctx = r->connection->log->data;
-    ctx->action = NULL;
-
     switch (r->headers_in.connection_type) {
     case 0:
         if (r->http_version > NGX_HTTP_VERSION_10) {
@@ -541,6 +538,10 @@ ngx_int_t ngx_http_find_location_config(
         r->connection->sendfile = 0;
     }
 
+    if (r->keepalive && clcf->keepalive_timeout == 0) {
+        r->keepalive = 0;
+    }
+
     if (!clcf->tcp_nopush) {
         /* disable TCP_NOPUSH/TCP_CORK use */
         r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;