GsonHttpMessageConverter cannot be used in an SseEmitter because it closes the response stream [SPR-16529] #21072
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Dave Syer opened SPR-16529 and commented
GsonHttpMessageConverter cannot be used in an SseEmitter (unlike MappingJackson2HttpMessageConverter) because it closes the output stream after every element, committing the HTTP response and shutting it down in the servlet container. To verify this you only need to build an app with Jackson and an SseEmitter, then switch to Gson and see it break (only the first event is emitted).
Affects: 4.3.14
Issue Links:
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: