I've noticed that the progress callback of TiHTTPClient under Android reaches a value of 1 way before the upload is completed. This can be seen on slow link speeds. I believe this bug also exists on normal speeds but is less apparent there.
This might be related to https://jira.appcelerator.org/browse/TC-5837
I've tested this with Titanium SDK 5.1.2 & 5.2.0 on Android 4, 5 and 6 devices. For testing I limited my wireless link speed with dd-wrt to 64kbits. This is also reproducable with slow mobile EDGE speeds.
The example code uses a 1 MB testfile from here: http://cachefly.cachefly.net/speedtest/
What should happen:
The link speed IS constant, so the progress log should be liniear. Assuming a BLANK response, the onload event should get called quickly after progress reached the value of 1.
What actually happens:
Progress goes up to value 1 very quickly (in 1-2 seconds). It's not possible to upload 1MB in ~1 second with the available bandwidth. The progress is not fired anymore after it reached the value of 1 although the upload is still in progress. After ~138 seconds the onload event fires correctly. The time of the onload event is consistent with the available bandwith. Router bandwith logs show also that a upload is in progress until the onload event is fired.