Hi--
I have just upgraded to 9.4.25.v20191220 and I have a piece of code that calls org.apache.commons.io.IOUtils.copy(inputStream, outputStream), where the outputStream is an instance of HttpOutput -- this code essentially just reads the code in chunks of 4096
bytes and writes that to the outputStream.
For one stream in particular (I'm still trying to figure out what is different with it), after sending 64,428 bytes, it sets the _apiState to BLOCKED. When the next segment is copied over, however, the _apiState is still BLOCKED and falls into the default
case which throws an IllegalStateException.
I've traced through the code and in line 806, I wonder why the code does not call onWriteComplete as would happen in line 835. Is that the bug? Or is there something more subtle here?
This is the exception for reference:
java.lang.IllegalStateException: s=OPEN,api=BLOCKED,sc=false,e=null
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:767)~[jetty-server-9.4.25.v20191220.jar:9.4.25.v20191220]
at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:639) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2315) ~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270) ~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291) ~[commons-io-2.6.jar:2.6]
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246) ~[commons-io-2.6.jar:2.6]
Thanks for any insight.
Eric
_______________________________________________