I also have fixes in my two current PRs for that,
because I had to fix this for my tests, but I can remove my own
SSE LF fixes if you merge his PRs first, since they should fix
the same issues, no problem.
Hi Alessio,For the LF issue, I already sent PRs [1] [2] to fix in resteasy. For SseEventSource.register(... Runnable onComplete) , I'll have a look this week.
Cheers,Jim
On Tue, Sep 19, 2017 at 6:57 AM, Alessio Soldano <asoldano@redhat.com> wrote:
AlessioThanksHi Stephan, hi Jimlooks like you had some private discussion on the topics mentioned here. Is anything sorted out or something still needs to be worked?
On Mon, Sep 4, 2017 at 10:29 AM, Stephane Epardaud <stef@epardaud.fr> wrote:
______________________________
On 04/09/17 07:59, Jim Ma wrote:
Yes, true. But the effect is the same in that users end up with one LF too many ;)On 09/02/2017 12:04 AM, Stephane Epardaud wrote:
From https://html.spec.whatwg.org/#Sorta related: you add a newline at the end of the data read via SSE in the client, but that's not correct: the NL should only be added if you have more than one 'data' field after another.
processField , the line feed is always added to data buffer. But now sse client missed this step the remove the last character from if it is a LF.
Well, this spec has no escaping, that I can find. But yes if we do meet a LF (or any other allowed terminator, because I'm not sure LF is the only one), we should start a new `data: ` line. This will at least deserialise properly on the other end.Should we escape these character ? Or we need to write another data field when meet these chars ?And similarly, you should really do some escaping when serialising SSE data, because \n and \r are special chars. I'm pretty sure as it is, it's not valid SSE.
_________________
resteasy-dev mailing list
resteasy-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/resteasy-dev