In Standard SSE, everything works well. However non-standard POST-SSE is widely used in LLM streaming responses.
Node.js didn't concisely define the semantic meaning of IncomingMessage's event close. The event close has several ambiguous meaning in semantics:
- The incoming data is completed consumed.
- The client wanna half disconnect.
If the server consumes the POST request body after SSE session is established, the session's event disconnect will occur when the request body is completed consumed, even though the client expects to continue receiving response chunks.
In Standard SSE, everything works well. However non-standard POST-SSE is widely used in LLM streaming responses.
Node.js didn't concisely define the semantic meaning of
IncomingMessage's eventclose. The eventclosehas several ambiguous meaning in semantics:If the server consumes the POST request body after SSE session is established, the session's event
disconnectwill occur when the request body is completed consumed, even though the client expects to continue receiving response chunks.