Skip to content

Server sent event (SSE) incorrect data format [SPR-16459] #21004

@spring-projects-issues

Description

@spring-projects-issues

Alexis opened SPR-16459 and commented

hi, when using webflux with SSE, it is not working under Firefox 52. It is working on last chrome and last FF (57)

to me it comes from that the text/event-stream produced is not complient with
http://www.w3.org/TR/eventsource/#event-stream-interpretation

The problem is similar than herehttps://stackoverflow.com/questions/18800540/javascript-sse-not-working-with-firefox

the produced response misses two \n\n
here is a correct response

data: The server time is: Fri, 02 Feb 2018 06:45:51 -0500

The problem appears if I return a

Flux<User>

or a

Flux<ServerSentEvent<User>>

here is the data corrupted where it misses a \n:

data: The server time is: Fri, 02 Feb 2018 06:45:51 -0500

here is a working exemple with FF52 (for proof)
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_sse


Affects: 5.0.2

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: invalidAn issue that we don't feel is valid

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions