[TIMOB-17057] iOS: HTTPClient - responseText is not cleared between two requests
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-05T20:07:22.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | Release 3.3.0, Release 3.4.0 |
Components | iOS |
Labels | module_network, qe-testadded, regression |
Reporter | Jérôme Danthinne |
Assignee | Vishal Duggal |
Created | 2014-06-01T12:59:29.000+0000 |
Updated | 2014-08-04T09:43:47.000+0000 |
Description
I use the HTTPClient to retrieve new tweets.
Since 3.3.0, it seems that the responseText prepends the previous value to the new one, so my JSON parser crashes the app.
At the first launch, here's what I get:
bq. {"tweets":[{"tweet":{"text":"Our friends @felttip_band have a new single and it's a great one again ! Hooked by the whistling https://t.co/6Wt1vkVhEs","created_time":"20140507112956","guid":"463973998452170752"}}]}
But if I try to refresh, here's what I get:
bq. {"tweets":[{"tweet":{"text":"Our friends @felttip_band have a new single and it's a great one again ! Hooked by the whistling https://t.co/6Wt1vkVhEs","created_time":"20140507112956","guid":"463973998452170752"}}]}{"tweets":[]}
As you can see, the correct response (empty array) is at the end, but the previous value is still there...
This does not happen with SDK 3.2.3.
Do you have a simple sample that demonstrates the problem we can reuse to make sure we see the same behavior?
A simple sample, not really, but I can send my app code if needed…
Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/5775 3_3_X - https://github.com/appcelerator/titanium_mobile/pull/5776
The response text gets cleared between calls and does not append to the previous response. Verified on: || Component || Version || | Appcelerator Studio | 3.3.0.201406061445 | | Titanium SDK | 3.3.0.RC | | Node | 0.10.28 | | acs | 1.0.14 | | alloy | 1.4.0-beta2 | | npm | 1.4.9 | | CLI | 3.3.0-beta3 | | Titanium-code-processor | 1.1.1 | | OS | OSX 10.9.2 | | Device | iPhone 5S (iOS 7.1) |