nginx-0.1.43-RELEASE import

    *) Feature: the listen(2) backlog in the "listen" directive can be
       changed using the -HUP signal.

    *) Feature: the geo2nginx.pl script was added to contrib.

    *) Change: the FastCGI parameters with the empty values now are passed
       to a server.

    *) Bugfix: the segmentation fault occurred or the worker process may
       got caught in an endless loop if the proxied or FastCGI server sent
       the "Cache-Control" header line and the "expires" directive was
       used; in the proxied mode the the bug had appeared in 0.1.29.
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index c6a5809..b8e97d2 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -637,8 +637,24 @@
                            "http exten: \"%V\"", &r->exten);
 
             if (r->http_version < NGX_HTTP_VERSION_10) {
+
+                if (rev->timer_set) {
+                    ngx_del_timer(rev);
+                }
+
+#if (NGX_STAT_STUB)
+                ngx_atomic_dec(ngx_stat_reading);
+                r->stat_reading = 0;
+                ngx_atomic_inc(ngx_stat_writing);
+                r->stat_writing = 1;
+#endif
+
+                rev->handler = ngx_http_request_handler;
+                c->write->handler = ngx_http_request_handler;
                 r->read_event_handler = ngx_http_block_read;
+
                 ngx_http_handler(r);
+
                 return;
             }
 
@@ -868,6 +884,7 @@
             r->read_event_handler = ngx_http_block_read;
 
             ngx_http_handler(r);
+
             return;
         }
 
@@ -1783,6 +1800,8 @@
         return NGX_OK;
     }
 
+    r->discard_body = 1;
+
     size = r->header_in->last - r->header_in->pos;
 
     if (size) {