{ "id": "165945", "key": "TIMOB-24397", "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": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-16T17:56:21.000+0000", "created": "2017-02-10T12:58:26.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "regression" ], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "54272", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "165373", "key": "TIMOB-24329", "fields": { "summary": "iOS: setting additional request header disallows POST form requests", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "54273", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "133897", "key": "TIMOB-17467", "fields": { "summary": "iOS/Android: Expose request-headers for WebView", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-03T17:33:22.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem*\r\nOpening a webpage like https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending with request headers does not work.\r\n\r\n_actual behavior_\r\n# click on 'open web page'\r\n# in the log is shown\r\n{noformat}\r\n[INFO] : beforeload: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\r\n[INFO] : beforeload: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\r\n[INFO] : load: about:blank\r\n[INFO] : beforeload: about:blank\r\n[INFO] : beforeload: about:blank\r\n[INFO] : beforeload: about:blank\r\n[INFO] : beforeload: about:blank\r\n{noformat}\r\n# webpage is not loaded\r\n\r\n_expected behavior_\r\n# click on 'open web page'\r\n# in the log is shown\r\n{noformat}\r\n[INFO] : beforeload: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\r\n[INFO] : beforeload: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\r\n[INFO] : load: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\r\n{noformat}\r\n# webpage is loaded\r\n\r\n*Test case*\r\nfile index.js\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n\r\nvar openButton = Ti.UI.createButton({\r\n title : 'Open web page',\r\n top : '200',\r\n height : Ti.UI.SIZE,\r\n left : '30',\r\n});\r\n\r\nopenButton.addEventListener('click', function() {\r\n\r\n var ldf = Ti.Platform.displayCaps.logicalDensityFactor;\r\n var webView = Ti.UI.createWebView({\r\n height : Math.floor(Ti.Platform.displayCaps.platformHeight / ldf),\r\n width : Math.floor(Ti.Platform.displayCaps.platformWidth / ldf),\r\n backgroundColor : \"white\",\r\n });\r\n\r\n webView.setBasicAuthentication(\"username\", \"password\");\r\n var requestHeaders = {\r\n \"Accept-Language\" : \"en\",\r\n \"X-Agent\" : \"Mobile\"\r\n };\r\n webView.setRequestHeaders(requestHeaders);\r\n\r\n webView.addEventListener('load', function() {\r\n Ti.API.info('load: ' + webView.url);\r\n });\r\n\r\n webView.addEventListener('beforeload', function() {\r\n Ti.API.info('beforeload: ' + webView.url);\r\n });\r\n\r\n webView.addEventListener('error', function() {\r\n Ti.API.info('error: ' + webView.url);\r\n });\r\n\r\n win.add(webView);\r\n\r\n var button = Ti.UI.createButton({\r\n title : 'Close',\r\n top : 25,\r\n bottom : 0,\r\n height : Ti.UI.SIZE,\r\n width : 100\r\n });\r\n\r\n button.addEventListener('click', function() {\r\n win.remove(webView);\r\n });\r\n\r\n webView.add(button);\r\n var url = \"https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending\";\r\n webView.setUrl(url);\r\n});\r\n\r\nwin.add(openButton);\r\n\r\nwin.open(); \r\n{code}", "attachment": [ { "id": "61545", "filename": "index.js", "author": { "name": "chris35", "key": "chris35", "displayName": "Christoph Eck", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-10T12:56:17.000+0000", "size": 1526, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: WebView - load a webpage with request headers", "creator": { "name": "chris35", "key": "chris35", "displayName": "Christoph Eck", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "chris35", "key": "chris35", "displayName": "Christoph Eck", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK version: 6.1.0.v20170209111025\r\nJavascript Engine: V8\r\nPlatform & version: iOS\r\nDevice Details: iOS simulator iPad Pro 9.7 10.2 \r\nHost Operating System: Mac OS X 10.12.2 \r\nTitanium Studio version: 4.8.1.201612050850", "closedSprints": [ { "id": 839, "state": "closed", "name": "2017 Sprint 04 SDK", "startDate": "2017-02-12T23:36:00.961Z", "endDate": "2017-02-26T23:36:00.000Z", "completeDate": "2017-02-26T17:38:54.172Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "406805", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I can see the webpage loads fine in SDK 6.0.1.GA in iOS simulator. Please use the GA release. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-10T15:36:34.000+0000", "updated": "2017-02-10T15:36:34.000+0000" }, { "id": "406806", "author": { "name": "chris35", "key": "chris35", "displayName": "Christoph Eck", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi\r\n\r\nThe setting of request headers is new for a WebView module and will be released in the version 6.1.0. Sorry I could not set the release version 6.1.0. Try it with the latest version 6.1.0.v20170209111025 and see if you could see the request headers set in the landing page. I have a pull request ready to solve the issue.\r\n\r\nBest regards\r\n\r\nChristoph", "updateAuthor": { "name": "chris35", "key": "chris35", "displayName": "Christoph Eck", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-10T15:44:38.000+0000", "updated": "2017-02-10T15:44:38.000+0000" }, { "id": "406809", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, yes, I was able to reproduce the issue in SDK 6.1.0 master release. Please add the PR. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-10T16:41:59.000+0000", "updated": "2017-02-10T16:41:59.000+0000" }, { "id": "406812", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for h follow-up Christoph, we will take care of it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-10T17:45:11.000+0000", "updated": "2017-02-10T17:45:11.000+0000" }, { "id": "406839", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "QE: Test-cases can be found in TIMOB-24329 and TIMOB-17467, thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-11T13:39:38.000+0000", "updated": "2017-02-11T13:39:38.000+0000" }, { "id": "408869", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "\r\n{noformat}\r\nMac OS Version : 10.12.3\r\nXcode Version : Xcode 8.2 Build version 8C38\r\nAppc CLI : 6.1.0\r\nAppc NPM : 4.2.9-1\r\nNode : v4.6.0\r\nDevice: iPhone 6 (10.2.1) iPhone 5 (9.3.5)\r\n{noformat}\r\n\r\nUsing above env passed FR. After merge, the changes are present in SDK {{6.1.0.v20170227120704}}.\r\n\r\n*Closing*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2017-03-03T17:33:10.000+0000", "updated": "2017-03-03T17:33:10.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }