Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13955] iOS: ImageView returns empty blob when "no-cache" is present in HTTP response headers

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-22T20:02:37.000+0000
Affected Version/sRelease 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterViktor Korol
AssigneeEric Merriman
Created2013-05-22T17:15:44.000+0000
Updated2017-06-22T20:02:38.000+0000

Description

*Problem* ImageView returns empty blob when "no-cache" is present in HTTP response headers. *Actual Result*
[INFO] :   Image loaded!, blob length: 0
*Expected Result* ImageView should return non empty blob. *Test case*
var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var imageView = Ti.UI.createImageView({
	image : 'http://www.voltimum.es/imageDisplay.php?w=265&h=265&f=./files/es/flipbooks/others/G/20130522271201301181170.jpg'
});

imageView.addEventListener('load', function(e) {
	Ti.API.info('Image loaded! blob length: ' + e.source.toBlob().length);
});

win.add(imageView);

win.open();

Attachments

FileDateSize
.log2013-05-22T17:16:37.000+0000786929
diagnostic3319004299605571106.log2013-05-22T17:16:45.000+000010701
toBlob.zip2013-05-22T17:19:59.000+00002153174

Comments

  1. Daniel Sefton 2013-05-22

    Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and latest 3.2 CI.
  2. Lee Morris 2017-06-22

    I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source