eclipse-rap / org.eclipse.rap

Eclipse RAP Runtime (Remote Application Platform)
https://www.eclipse.org/rap/
Eclipse Public License 1.0
17 stars 19 forks source link

Fix ServerPushSession is interrupted after a period of inactivity #168

Closed ifurnadjiev closed 7 months ago

ifurnadjiev commented 7 months ago

ServerPushManager checks if connection is alive by pushing a single space character every 30 sec. As the content lenght is not set, this triggers "Transfer-Encoding:chunked" response header automatically by the container. The "chunked" response requires a specific body format and handling on the client. Currently, the browser throws ERR_INCOMPLETE_CHUNKED_ENCODING error and terminates the server push request.

Remove the code the checks if the connection is alive. Release server push request regularly on check interval instead.

Fix #167

ifurnadjiev commented 7 months ago

Can you add to the commit comment the reason (fetch API change) that caused this regression? I think that'd be important to remember in the future.

Done!