4.0.1
·
4 commits
to main
since this release
[4.0.1] - 2023-01-09
Added:
StreamClosedWithIncompleteMessageException
(see below).
Fixed:
- When using streaming data mode (see
EventSource.Builder.streamEventData
), if the stream connection was lost before theMessageEvent
was fully read-- that is, before encountering a blank line-- theReader
returned byMessageEvent.getDataReader()
was treating this as a regular EOF condition. That was incorrect; the SSE specification says that in such a case, the incomplete message is invalid and its contents should not be used. Therefore, in this case reading from theReader
will throw aStreamClosedWithIncompleteMessageException
. The caller should handle this by simply throwing away theMessageEvent
.