Bug 58608 - Issue with IIS7+ buffered response
Summary: Issue with IIS7+ buffered response
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: isapi (show other bugs)
Version: 1.2.41
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2015-11-13 17:18 UTC by George Stanchev
Modified: 2016-09-15 14:13 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description George Stanchev 2015-11-13 17:18:25 UTC
We have run into an issue with Tomcat Connector and IIS7+. The request to Tomcat routed via the Connector contains a number of batch requests that require batch responses which are then processed as they arrive by the client. IIS buffers the HTTP response until the buffer is full or the response is fulfilled. This is described by Microsoft in the following KB article [1]. While IIS sits and buffers the response our client loses interactivity and just sits idle waiting for the whole result to arrive. The issue is also exacerbated by dealing with large batch responses (think of a multiple files sent back as part of the response) where the client decides the connection is dead and closes the connection.

If we call 

lpEcb->ServerSupportFunction(lpEcb->ConnID, HSE_REQ_SET_FLUSH_FLAG, (LPVOID) TRUE, NULL, NULL);

In "DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpEcb)" it fixes the issue.

I don't have a patch to attach (though if encouraged I can look into getting one) but I propose to introduce a registry setting that controls this flag. The default value of it can be debated but at least it will give the ability to work around the problems with use case described above.

[1] https://support.microsoft.com/en-us/kb/946086
Comment 1 Mark Thomas 2016-09-15 14:13:13 UTC
This has been fixed in trunk for 1.2.42 onwards with a new option called "flush_packets".