Invert the check for ServletInputStream.isReady()
When checking whether there is still request body the first method that should be checked is ServletInputStream.isReady() and then ServletInputStream.isFinished(). ServletInputStream.isReady() is the active method whereas the ServletInputStream.isFinished() is not. It is important to call ServletInputStream.isReady() because if it returns false it will schedule a dispatch and if the request body is already read it will send onAllDataRead event. Issue: SPR-16521
This commit is contained in:
parent
20287e0cb0
commit
030bc224e3
|
@ -263,7 +263,7 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
|||
|
||||
@Override
|
||||
protected void checkOnDataAvailable() {
|
||||
if (!this.inputStream.isFinished() && this.inputStream.isReady()) {
|
||||
if (this.inputStream.isReady() && !this.inputStream.isFinished()) {
|
||||
onDataAvailable();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue