appcelerator/titanium_mobile — pull request #2536 by farfromrefug (2012-07-11 15:43:49+00:00)
Title: HTTPClient: ondatastream modifications

I needed to have a comet session using Titanium on iOS. Right now the implementation of TiNetworkHTTPClientProxy doesnt allow this because it doesnt implement didReceiveData of ASIHTTPRequest.
Though using didReceiveData would have broken ondatastream and onsendstream.
So what i did was create a third one "ondatastream" for live data processing.
In the meantime i renamed ondatastream to ondownloadprogress and onsendstream to onsendprogress.

WARNING: on ios using the new "ondatastream" will break responseText and responseData. This is due to the ASIHTTPRequest implementation

It makes it more understandable when i had the third one.

I made the related Android modification but did not really had time to test it yet.

I think it could be useful to others.