Re: can a httpd fcgi module start sending generated response while the request message body is still being transmitted to the app?

David Birmbaum <[email protected]> Mon, 21 Jan 2013 10:23:21 -0800
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
--===============6871410920769342536==
Content-Type: multipart/alternative;
	boundary=Apple-Mail-7BD8AFB8-F37C-42D8-A35D-32F7011EE6AF
Content-Transfer-Encoding: 7bit


--Apple-Mail-7BD8AFB8-F37C-42D8-A35D-32F7011EE6AF
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable

The mod_fastcgi library has an internal buffer that it uses to improve effic=
iency back to the HTTP process.  You can tune it if you like; I would often c=
rank it way up so the application could dump the whole output without having=
 to wait for the client to receive.

David.

------

On Jan 20, 2013, at 4:34 PM, Thomas H Bowden Jr <[email protected]> wro=
te:

> I agree with Jay.
>=20
> My web-server (by force) has always been apache.  I use perl scripts for a=
nything that is not c++.  In there I have to unbuffer stdin/stdout  ( $|=3D1=
).
>=20
>=20
> On Jan 20, 2013, at 4:42 PM, Jay Sprenkle <[email protected]> wrote:
>=20
>> Wouldn't the web server module control that behavior?
>> Seems like fastcgi doesn't have any control over what happens to the data=
 after it's written to the pipe.
>>=20
>>=20
>> On Sun, Jan 20, 2013 at 1:33 PM, [email protected] <[email protected]> w=
rote:
>>> Hi all!
>>>=20
>>> I was trying to send a (chunked-encoding) answer that was being
>>> generated after each chunk of the POST-ed message body was being
>>> received. I tried with both mod_fcgid and mod_proxy_fcgi and
>>> both seem to buffer output until all POSTed message body was
>>> delivered to the application
>> --=20
>> http://xkcd.com/1156/
>>=20
>>=20
>> _______________________________________________
>> FastCGI-developers mailing list
>> FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
>> http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers
>=20
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers

--Apple-Mail-7BD8AFB8-F37C-42D8-A35D-32F7011EE6AF
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div>The mod_fastcgi library has an interna=
l buffer that it uses to improve efficiency back to the HTTP process. &nbsp;=
You can tune it if you like; I would often crank it way up so the applicatio=
n could dump the whole output without having to wait for the client to recei=
ve.<br><br>David.<div><br></div><div>------</div></div><div><br>On Jan 20, 2=
013, at 4:34 PM, Thomas H Bowden Jr &lt;<a href=3D"mailto:charles_thomas@mac=
.com">[email protected]</a>&gt; wrote:<br><br></div><blockquote type=3D=
"cite"><div><meta http-equiv=3D"Content-Type" content=3D"text/html charset=3D=
iso-8859-1">I agree with Jay.<div><br></div><div>My web-server (by force) ha=
s always been apache. &nbsp;I use perl scripts for anything that is not c++.=
 &nbsp;In there I have to unbuffer stdin/stdout &nbsp;( $|=3D1).</div><div><=
br></div><div><br><div><div>On Jan 20, 2013, at 4:42 PM, Jay Sprenkle &lt;<a=
 href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:</div=
><br class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Wouldn't t=
he web server module control that behavior?<br>Seems like fastcgi doesn't ha=
ve any control over what happens to the data after it's written to the pipe.=
<br><br><br><div class=3D"gmail_quote">On Sun, Jan 20, 2013 at 1:33 PM, <a h=
ref=3D"mailto:[email protected]">[email protected]</a> <span dir=3D"ltr">&=
lt;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
r</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">Hi all!<br>
<br>
I was trying to send a (chunked-encoding) answer that was being<br>
generated after each chunk of the POST-ed message body was being<br>
received. I tried with both mod_fcgid and mod_proxy_fcgi and<br>
both seem to buffer output until all POSTed message body was<br>
delivered to the application<br></blockquote></div>-- <br><i style=3D"font-s=
ize:12px;font-family:Verdana,Helvetica,sans-serif"><a href=3D"http://xkcd.co=
m/1156/" target=3D"_blank">http://xkcd.com/1156/</a></i><br><div><font face=3D=
"Verdana, Helvetica, sans-serif"><span style=3D"font-size:12px"><i><br>
</i></span></font><div><br></div></div>
_______________________________________________<br>FastCGI-developers mailin=
g list<br><a href=3D"mailto:FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org">FastCGI-=
[email protected]</a><br><a href=3D"http://mailman.fastcgi.com/=
mailman/listinfo/fastcgi-developers">http://mailman.fastcgi.com/mailman/list=
info/fastcgi-developers</a><br></blockquote></div><br></div></div></blockquo=
te><blockquote type=3D"cite"><div><span>____________________________________=
___________</span><br><span>FastCGI-developers mailing list</span><br><span>=
<a href=3D"mailto:FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org">FastCGI-developers=
@mailman.fastcgi.com</a></span><br><span><a href=3D"http://mailman.fastcgi.c=
om/mailman/listinfo/fastcgi-developers">http://mailman.fastcgi.com/mailman/l=
istinfo/fastcgi-developers</a></span><br></div></blockquote></body></html>=

--Apple-Mail-7BD8AFB8-F37C-42D8-A35D-32F7011EE6AF--

--===============6871410920769342536==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers

--===============6871410920769342536==--