Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
BvanMunster opened this issue Jan 12, 2022 · 1 comment
Closed

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

BvanMunster opened this issue Jan 12, 2022 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression
Milestone

Comments

@BvanMunster
Copy link

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 12, 2022
@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 12, 2022
@jhoeller jhoeller added this to the 5.3.15 milestone Jan 12, 2022
@jhoeller jhoeller self-assigned this Jan 12, 2022
@jhoeller jhoeller added type: regression A bug that is also a regression and removed type: bug A general bug labels Jan 12, 2022
@jhoeller
Copy link
Contributor

jhoeller commented Jan 12, 2022

This seems to have been caused by #27473, fine-tuning the removal of spaces in SSE data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

3 participants