knox icon indicating copy to clipboard operation
knox copied to clipboard

KNOX-3065: SSE support for Knox

Open hanicz opened this issue 4 months ago • 0 comments

What changes were proposed in this pull request?

SSE support for Knox.

Currently Knox is not working with SSE. In case of SSE the response header contains Content-Type = text/event-stream, in which case the server will send messages terminated by \n\n. Knox should send these messages to the client as they arrive. Currently Knox collects them all, and once the server closes the connection sends all of them concatenated to each other to the client.

Requirement:

Full support in Knox for Server Sent Events. Definition of done:

Clients can connect to SSE endpoints in the backend via Knox. Server Sent Events (https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) are forwarded by Knox from the server to the client as soon as they are received.

How was this patch tested?

Unit tests. Locally tested with a custom SSE service.

hanicz avatar Oct 22 '24 11:10 hanicz