Open jameswomack opened 9 years ago
Interesting. Can you please give me some sample code I can run to repro?
I've created an example in jameswomack/restify-eventsource.
The commit that shows what needs to be bypassed is 26ac2e8ae3ada96743f0d15a8dc4582d035e4c69
The example file is @ https://github.com/jameswomack/restify-eventsource/blob/restification/example.js
Marking as unconfirmed until a maintainer is able to reproduce. We appreciate you creating a repro case!
@retrohacker thanks
SSE looks super slick :smile:
Is this module being used anywhere, and it it stable? Would love to link to it from the website.
The repro case looks like it conflates a lot of the SSE logic with gzip breaking keep-alive connections, I'm going to attempt to make a smaller repro case here soon. Is it fair to say that the core of this issue is our gzip plugin not supporting keep-alive sessions?
Is it fair to say that the core of this issue is our gzip plugin not supporting keep-alive sessions?
@retrohacker yes I think you can say that
Is this module being used anywhere, and it it stable? Would love to link to it from the website.
I've only used it on smaller projects and nothing in the past 6 months. It worked well for me, but I can't speak to it beyond that 😄
I can confirm I am seeing the same behavior and also confirm that the workaround works but is not ideal since we lose compression. The alternative workaround is to wrap the gzip plugin to conditionalize when it gets invoked based on the accept-header.
I have to call
in my SSE plugin to bypass the Gzip plugin—otherwise EventSource fails.
The solution would involve adding support for keep alive connection in the Gzip plugin.