We have a site that streams text data over http. It is set up in the following way:
- It doesn't do any server side buffering
Content-Type
istext/plain
Transfer-Encoding
ischunked
- Compression is disabled
When using plain curl
or FireFox, the text gets streamed to the browser to the browser from the first byte. But when using Chrome, no text is displayed until 1024 bytes have been sent. After that, everything show up instantly.
Question: is there a way to disable this buffering behavior?
More info: here is a simple ASP.NET page that demonstrates the behavior:
<%@ language=c# %>
<%
Response.BufferOutput = false;
Response.ContentType = "text/plain";
for (int i=0; i<50; i++)
{
Response.Write("01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\r\n");
System.Threading.Thread.Sleep(1000);
}
%>
With a web.config that disables compression:
<configuration>
<system.webServer>
<urlCompression doStaticCompression="false" doDynamicCompression="false"/>
</system.webServer>
</configuration>
I also have a live repro running at http://bufferingtest.azurewebsites.net/. Just hit it from both Chrome and FireFox to observe the different behavior.