Skip to content

Commit 3b4ae7b

Browse files
committed
TomcatHttpHandlerAdapter continues after 0 bytes
This commit makes sure that TomcatServerHttpRequest::readFromInputStream follows the same contract as the method it overrides, and returns AbstractListenerReadPublisher.EMPTY_BUFFER when 0 bytes are read. See gh-28241
1 parent 8b39698 commit 3b4ae7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHttpHandlerAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ else if (read == -1) {
153153
return EOF_BUFFER;
154154
}
155155
else {
156-
return null;
156+
return AbstractListenerReadPublisher.EMPTY_BUFFER;
157157
}
158158
}
159159
finally {

0 commit comments

Comments
 (0)