]> granicus.if.org Git - php/commitdiff
If there is a content body, enable lingering and disable keep alive.
authorSascha Schumann <sas@php.net>
Fri, 16 May 2003 22:32:22 +0000 (22:32 +0000)
committerSascha Schumann <sas@php.net>
Fri, 16 May 2003 22:32:22 +0000 (22:32 +0000)
sapi/thttpd/thttpd.c

index 1c13c356b1c2d62c02cc8434c76858207c6428ee..48054c4394999df86c31207fd68ce9d07ec8c45d 100644 (file)
@@ -633,8 +633,10 @@ static off_t thttpd_real_php_request(httpd_conn *hc, int show_source TSRMLS_DC)
        TG(hc) = hc;
        hc->bytes_sent = 0;
 
-       if (hc->method == METHOD_POST)
+       if (hc->contentlength != -1) {
                hc->should_linger = 1;
+               hc->do_keep_alive = 0;
+       }
        
        if (hc->contentlength != -1
                        && SIZEOF_UNCONSUMED_BYTES() < hc->contentlength) {