{ "id": "77142", "key": "TIMOB-5514", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-07-01T01:15:31.000+0000", "created": "2011-06-30T04:46:08.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:31:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "Ti.Network.HTTPClient.getResponseHeader method generates an error in Google Chrome and returns null in Mozilla Firefox. It should return the response header. \r\nHow to: run test and look at console log.\r\n{code:JavaScript}\r\nvar win = Titanium.UI.currentWindow;\r\n\r\nvar l = Titanium.UI.createLabel({\r\n\ttext:'Downloading image...',\r\n\tfont:{fontSize:13},\r\n\ttop:30,\r\n\tleft:10,\r\n\twidth:300,\r\n\tcolor:'#888'\r\n});\r\nwin.add(l);\r\nvar imageView = Titanium.UI.createImageView({\r\n\ttop:50,\r\n\tleft:10,\r\n\theight:100,\r\n\twidth:125\r\n});\r\nwin.add(imageView);\r\n\r\nvar closeButton = Ti.UI.createButton({\r\n\ttitle:'Close Window',\r\n\theight:40,\r\n\twidth:300,\r\n\ttop:160,\r\n\tleft:10,\r\n\tfont:{fontSize:20}\r\n});\r\n\r\ncloseButton.addEventListener('click', function()\r\n{\r\n\twin.close();\r\n});\r\n\r\nwin.add(closeButton);\r\nvar xhr = Titanium.Network.createHTTPClient();\r\n\r\n\r\nvar _url = (Ti.Platform.isBrowser)?'images/titanium_desk.png':'http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png';\r\n\r\n\r\nxhr.onload = function()\r\n{\r\n\timageView.url = _url;\r\n};\r\n\r\nxhr.open('GET', _url);\r\nconsole.log(xhr.getResponseHeader('Content-Length'));\r\n\r\n// send the data\r\nxhr.send();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Ti.Network.HTTPClient.getResponseHeader method generates an error or returns null.", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "158397", "author": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For proper work you must rewrite part of code:\r\n\r\nvar xhr = Titanium.Network.createHTTPClient();\r\n\r\n\r\nvar _url = (Ti.Platform.isBrowser)?'images/titanium_desk.png':'http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png';\r\n\r\n\r\nxhr.onload = function()\r\n{\r\n\timageView.url = _url;\r\n};\r\n\r\nxhr.onreadystatechange = function () {\r\n\tif (2 == xhr.readyState) {\r\n\t\tconsole.log(xhr.getResponseHeader('Last-Modified'));\r\n\t}\r\n}\r\n\r\nxhr.open('GET', _url);\r\n\r\n// send the data\r\nxhr.send();", "updateAuthor": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-01T01:14:29.000+0000", "updated": "2011-07-01T01:14:29.000+0000" }, { "id": "410441", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T20:31:39.000+0000", "updated": "2017-03-09T20:31:39.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }