websocket-rails/websocket-rails — pull request #172 by lkol (2013-12-15 12:51:30+00:00)
Title: Support HTTP streaming for Internet Explorer versions 8+ by using XDomainRequest

Solves HTTP streaming problems in IE 8-9 by using XDomainRequest object. Kind of a hack, but that's what you get for supporting old IE versions :)

**The root cause for problems with IE 8-9 was:**
_"One challenge with using XMLHTTPRequest is that browsers behave differently when it comes to streaming of content. A common complaint against XMLHTTPRequest in IE was that it doesn’t stream content. More specifically, the responseText property cannot be queried when readyState=3 (Receiving) and it only becomes available when readyState=4 (Loaded)."_
**Source:** http://blogs.msdn.com/b/ieinternals/archive/2010/04/06/comet-streaming-in-internet-explorer-with-xmlhttprequest-and-xdomainrequest.aspx

I had to add CORS Access-Control-Allow-Origin header and prepend 2kb of whitespace to first response, as suggested in the article.

Should solve problems in #34 & #73

Unfortunately does not work for IE7 and below, as XDomainRequest was introduced in IE8