4 ms·
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 u
by mmzeeman 5y ago
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.
- bastawhiz 5y agoHow did you find that out?
- mmzeeman 5y agohttps://github.com/mmzeeman/mod_sse https://github.com/mmzeeman/mod_sse
- ronsor 5y agoThese 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.
- captn3m0 5y agoI was using SSE when they'd just launched (almost a decade ago now) and never faced any AV issues.
- azinman2 5y agoIs 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.
- bullen 5y agoThey 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...
- pornel 5y agoIt'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")