Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3094] Android: NumberFormatException if cached file does not have a content-length

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M09
ComponentsAndroid
Labelsandroid, defect, release-1.6.0, reported-1.6.0
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T03:36:44.000+0000
Updated2011-04-17T02:00:54.000+0000

Description

Failcase app.js:

Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({  
    title:'Test',
    backgroundColor:'#000',
    exitOnClose: true
});
var thisURL = "module=MultiSites&action=getEvolutionGraph&period=day&date=2011-01-04,2011-02-02&evolutionBy=visits&columns=nb_visits&idSite=7&idsite=7&viewDataTable=sparkline";

var paramArray = thisURL.split("&");
for(var i=0,ilen=paramArray.length;i<ilen;i++){
    var thisKeyValue = paramArray[i].split("=");
    thisKeyValue[1] = Ti.Network.encodeURIComponent(thisKeyValue[1]);
    paramArray[i] = thisKeyValue.join("=");
}
var encodedURI = paramArray.join("&");
var encodedURL = "http://demo.piwik.org/index.php?" + encodedURI;
Ti.API.info(encodedURL);

var imageView = Ti.UI.createImageView({
    image: encodedURL
});
 
win.add(imageView);
win.open();

This app will crash when you run it.

Comments

  1. Bill Dawson 2011-04-15

    (from [4f7ca257dc0c13829996d2c6503cce5effff8388]) Access headers in case-insensitive fashion, do not write out transfer-encoding: chunked header, fix regular expression that checks for no caching, fix removal of uri from set of uris currently downloading. [#3095 state:fixed-in-qa][#3094 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/4f7ca257dc0c13829996d2c6503cce5effff8388"> https://github.com/appcelerator/titanium_mobile/commit/4f7ca257dc0c...

  2. Opie Cyrus 2011-04-15

    verified emulator 2.2.

    App does not crash but image does not show up. Ticket #3093 already exists for that issue.

  3. Bill Dawson 2011-04-15

    (from [d08271606cb059c5bc0d3be4a0ec809ba990fe29]) Access headers in case-insensitive fashion, do not write out transfer-encoding: chunked header, fix regular expression that checks for no caching, fix removal of uri from set of uris currently downloading. [#3095 state:fixed-in-qa][#3094 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/d08271606cb059c5bc0d3be4a0ec809ba990fe29"> https://github.com/appcelerator/titanium_mobile/commit/d08271606cb0...

  4. Opie Cyrus 2011-04-15

    Setting back to resolved. Was set to fixed-in-qa by cherry pick.

JSON Source