-
Bug
-
Resolution: Done
-
Major
-
4.5.6.Final
-
None
-
Undefined
When mediaType is derived from @SseElementType or setting with EventBuilder's mediaType:
@GET @Path("/bigmsg") @Produces(MediaType.SERVER_SENT_EVENTS) @SseElementType(MediaType.APPLICATION_JSON) public void bigEventMsg(@Context SseEventSink sink) }
eventSink.send(sse.newEventBuilder().mediaType(MediaType.APPLICATION_JSON_TYPE).data(jsonMessage).build());
This sse message is sending like :
-----------------Invalid ---------------------- : this is comment id: id data: { "index": "Resteasy_Index_1", "message": "", "foo": "bar" } ---------------------------------------------------
From Server sent events spec]] , the data value of this event will be interpreted as only unexpected value "{" . Others are all treated with other name fields or ignored.The intended json message are completely broken during processing.