News for hackers. Stuff that matters.
Re:Server-Sent Events: an alternative to WebSockets by mmzeeman on Saturday February 12, 2022 @10:54AM (#30313692)
Did research on SSE a short while ago. Found out that the mimetype "text/event-stream" was blocked by a couple of anti-virus products. So that was a no-go for us.
Re:Server-Sent Events: an alternative to WebSockets by pornel on Saturday February 12, 2022 @01:05PM (#30314799)
It's not blocked. It's just that some very badly written proxies can try to buffer the "whole" response, and SSE is technically a never-ending file.

It's possible to detect that, and fall back to long polling. Send an event immediately after opening a new connection, and see if it arrives at the client within a short timeout. If it doesn't, make your server close the connection after every message sent (connection close will make AV let the response through). The client will reconnect automatically.

Or run:

    while(true) alert("antivirus software is worse than malware")
Re:Server-Sent Events: an alternative to WebSockets by ronsor on Saturday February 12, 2022 @11:14AM (#30313846)
These days I feel like the only way to win against poorly designed antiviruses and firewalls is to—ironically enough—behave like malware and obfuscate what's going on.
Re:Server-Sent Events: an alternative to WebSockets by bullen on Saturday February 12, 2022 @11:29AM (#30313978)
They don't block it, they cache the response until there is enough data in the buffer... just push more garbage data on the first chunks...
Re:Server-Sent Events: an alternative to WebSockets by captn3m0 on Saturday February 12, 2022 @11:19AM (#30313891)
I was using SSE when they'd just launched (almost a decade ago now) and never faced any AV issues.
Re:Server-Sent Events: an alternative to WebSockets by azinman2 on Saturday February 12, 2022 @02:37PM (#30315595)
Is that still the case now? How big and broad an audience do you have?

My experience, now a bit dated, is that long polling is the only thing that will work 100% of the time.

Re:Server-Sent Events: an alternative to WebSockets by bastawhiz on Saturday February 12, 2022 @11:02AM (#30313753)
How did you find that out?
Re:Server-Sent Events: an alternative to WebSockets by mmzeeman on Saturday February 12, 2022 @02:42PM (#30315634)