Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1317] TiHttpClient does not properly handle write errors

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2015-04-10T00:13:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage
ReporterSzymon Tomasz Stefanek
AssigneeRadamantis Torres-Lechuga
Created2014-10-22T20:00:07.000+0000
Updated2016-03-08T07:37:43.000+0000

Description

TiHttpClient does not properly handle write errors. For instance, if there is no space left on the device, writing the downloaded stream to the storage will fail. The exception is caught inside the TiHttpClient code but is largely ignored and not propagated to the javascript side. The download continues even if the file on disk is corrupted and will even terminate succesfully when the whole stream is received. See line 312 of https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java

Comments

  1. Szymon Tomasz Stefanek 2015-04-10

    Hum... what kind of info you need? To me the problem seems clear by simply looking at the source.

JSON Source