Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 98116 invoked from network); 3 Dec 2007 16:55:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2007 16:55:35 -0000 Received: (qmail 76719 invoked by uid 500); 3 Dec 2007 16:55:20 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 76660 invoked by uid 500); 3 Dec 2007 16:55:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 76649 invoked by uid 99); 3 Dec 2007 16:55:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 08:55:20 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [81.89.48.226] (HELO tonymontana.websupport.sk) (81.89.48.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 16:55:21 +0000 Received: from tonymontana.websupport.sk (localhost [127.0.0.1]) by clamsmtp.websupport.sk (Postfix) with ESMTP id 77DEB5141C3 for ; Mon, 3 Dec 2007 17:55:26 +0100 (CET) Received: from [10.0.0.10] (adsl-dyn212.91-127-72.t-com.sk [91.127.72.212]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: stanojr@websupport.sk) by tonymontana.websupport.sk (Postfix) with ESMTP id 4BEEC51404F for ; Mon, 3 Dec 2007 17:55:26 +0100 (CET) Message-ID: <475434DF.6000803@blackhole.sk> Date: Mon, 03 Dec 2007 17:54:55 +0100 From: Pavel Stano User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: apache 2.2 mod_proxy_http disable buffering References: <99EA83DCDE961346AFA9B5EC33FEC08B05B284@VF-MBX11.internal.vodafone.com> In-Reply-To: <99EA83DCDE961346AFA9B5EC33FEC08B05B284@VF-MBX11.internal.vodafone.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org Pl�m wrote: > >> -----Urspr�ngliche Nachricht----- >> Von: Pavel Stano >> Gesendet: Montag, 3. Dezember 2007 09:53 >> An: dev@httpd.apache.org >> Betreff: apache 2.2 mod_proxy_http disable buffering >> >> >> hello, >> >> it is possible to disable buffering in mod_proxy_http ? >> or something like flush after each received data (i want this > > At least with 2.2.6 (possibly earlier 2.2.x versions) it has autoflushing. > This means once there is no more data available for reading in the response > stream from the backend it flushes what it got so far. So if your php script > on the backend generates its response in blocks with pause times between them > each of them will be send to the client immediately. > > Regards > > R�diger i have 2.2.6, but it dont work, proxy send me data after end of request i have very simple php script (or .cgi, i try it too) php buffering is configured ok, when i connect with telnet to backend server a request a.php, it work as expected it show immedietaly headers and AB and after 5 second it show C and close connection when i connect to reverse proxy and request a.php, 5 second is silent and after that it send me response maybe a bug in mod_proxy_http ? (or not a bug but broken feature :)) here is strace from that proxy ... we write request to backend 22112 17:06:47.916530 writev(12, [{"GET /a.php HTTP/1.1\r\n", 21}, {"Host: rtfm.home\r\n", 17}, {"Max-Forwards: 10\r\n", 18}, {"X-Forwarded-For: 127.0.0.1\r\n", 28}, {"X-Forwarded-Host: rtfm.home\r\n", 29}, {"X-Forwarded-Server: rtfm.home\r\n", 31}, {"Connection: Keep-Alive\r\n", 24}, {"\r\n", 2}], 8) = 170 ... we got answer (headers and AB) 22112 17:06:47.920203 read(12, "HTTP/1.1 200 OK\r\nDate: Mon, 03 D"..., 8000) = 156 22112 17:06:47.920418 poll( ... here we want send first data to client, but we just wait for data from backend ... after 5 seconds we got C and send everything to client 22112 17:06:52.920176 <... poll resumed> [{fd=12, events=POLLIN, revents=POLLIN}], 1, 60000) = 1 22112 17:06:52.920232 read(12, "1\r\nC\r\n3\r\n \n\n\r\n0\r\n\r\n", 8000) = 19 22112 17:06:52.920315 close(12) = 0 22112 17:06:52.920414 writev(11, [{"HTTP/1.1 200 OK\r\nDate: Mon, 03 D"..., 139}, {"A", 1}, {"B", 1}, {"C", 1}, {" \n\n", 3}], 5) = 145 22112 17:06:52.920561 times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 432369321 22112 17:06:52.920626 shutdown(11, 1 /* send */) = 0 maybe can someone look at the code if it can be fixed with some small patch ? i dont understand yet those buckets and brigades thanks -- Pavel Stano