Skip to content

Cannot read server-sent events without data (a.k.a. heartbeats) #27923

Closed
@BvanMunster

Description

@BvanMunster

Affects: 5.3.11+
org.springframework.http.codec.ServerSentEventHttpMessageReader.buildEvent(List<String> lines, ResolvableType valueType, boolean shouldWrap, Map<String, Object> hints) yields a StringIndexOutOfBoundsException if a line equals "data:", because line.charAt(5) is called.
This means that it fails at reading server-sent events that are heartbeats.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions