From: Sascha Schumann Date: Fri, 16 May 2003 22:32:22 +0000 (+0000) Subject: If there is a content body, enable lingering and disable keep alive. X-Git-Tag: RELEASE_1_0_2~788 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=528c495d688a3e06f0f7e2a5522c81baf851c620;p=php If there is a content body, enable lingering and disable keep alive. --- diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 1c13c356b1..48054c4394 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -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) {