javaee / jersey

This is no longer the active Jersey repository. Please see the README.md

Home Page:http://jersey.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSE Events delimiter

kopili opened this issue · comments

Hello :)

I see that for EventInput the delimiters between the events are strictly specified ("\n\n" or "\r\n\r\n") - is this according to some standard? Can you help me find it? The only one I found is here:
https://html.spec.whatwg.org/multipage/server-sent-events.html
but it seems very immature to me and says nothing about delimiters. :( Thanks in advance!

https://github.com/jersey/jersey/blob/43c81e3f307e1d364094d0cba57f7618908e8145/media/sse/src/main/java/org/glassfish/jersey/media/sse/EventInput.java#L65

It actually says about delimiters: https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream. Look at the grammar. Comment, Field, and event each end with new line.

I am closing this as this is no issue.