https://bz.apache.org/bugzilla/show_bug.cgi?id=69982

--- Comment #6 from Phil Clay <[email protected]> ---
I think I've identified the change between 10.1.52 and 11.1.18 that is causing
this problem...

Http11OutputBuffer.SocketOutputBuffer.end():

Tomcat 10.1.52:

https://github.com/apache/tomcat/blob/10.1.52/java/org/apache/coyote/http11/Http11OutputBuffer.java#L569

        @Override
        public void end() throws IOException {
            socketWrapper.flush(true);
        }


Tomcat 11.0.18:

https://github.com/apache/tomcat/blob/11.0.18/java/org/apache/coyote/http11/Http11OutputBuffer.java#L558

        @Override
        public void end() throws IOException {
            socketWrapper.flush(response.getWriteListener() == null);
        }



In Tomcat 11, when the problem reproduces, false is being passed to
socketWrapper.flush here.  I assume this is because WebFlux is using an async
servlet.


If I modify the 11.0.18 code to always pass true (similar to 10.1.52), and
re-run the test with 11.0.18 (plus that change), then I can no longer reproduce
the problem.

This probably also explains why the problem does not occur with WebMVC and
synchronous servlets.


I realize that passing false is probably more correct in this case, since this
is using async servlets.  But, the change is definitely causing this problem.


I'm unsure if the fix should be in Tomcat or if Spring WebFlux needs to change
its behavior.  Please let me know your thoughts.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to