{ "id": "84179", "key": "TIMOB-6832", "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": "12092", "description": "", "name": "Sprint 2011-52", "archived": true, "released": true, "releaseDate": "2011-12-30" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-23T16:56:03.000+0000", "created": "2011-12-21T15:26:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14380", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "79504", "key": "TIMOB-5807", "fields": { "summary": "getResponseHeader('WWW-Authenticate') on 401 returns null", "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 } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:36.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": "h4. Expected Behavior\r\nCreate a custom header with a name, and find it by this name case insensitive\r\n\r\nh4. Actual Behavior\r\nWhile upgrading from iOS4 to iOS5 we ran into some issues where iOS4 appeared to be changing the case of response header names--so \"MY-Custom-Header\" would become \"My-Custom-Header\". As a result when we tried searching for \"MY-Custom-Header\" it would not be found. To solve this problem we performed a case-insensitive search for response headers.\r\nIn the Titanium Mobile's caseCorrect method (iPhone/Classes/TiUtils.m) it looks like the code is attempting to fix this case-changing problem on pre-iOS5 versions. There's a problem here though: if the a response header is called \"my-custom-header\" it will not be found in pre-iOS5 versions because caseCorrect converts it to \"My-Custom-Header\".\r\n\r\nh4.Test Case \r\n\r\n{code}\r\nvar xhr = Titanium.Network.createHTTPClient();\r\n\r\nxhr.onload = function()\r\n{\r\n var customHeader = \"my-custom-header\";\r\n Titanium.API.debug( \"Custom response header: \" + customHeader + \" = \" + xhr.getResponseHeader( customHeader ) );\r\n};\r\n\r\nxhr.open( \"GET\", \"http://localhost:8080/\" );\r\nxhr.send();\r\n\r\n{code}\r\n\r\nh4. Response\r\n\r\nThe debug output on the iPhone 4.3 Simulator was:\r\n[DEBUG] Custom response header: my-custom-header = undefined\r\nThe debug output on the iPhone 5 Simulator was:\r\n[DEBUG] Custom response header: my-custom-header = header value\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Search for response headers is case sensitive", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": null, "comment": { "comments": [ { "id": "177307", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The provided test is not valid without a properly configured server; we need something that feeds a custom header reliably from a remote source in order to properly test and QE a fix.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T11:48:45.000+0000", "updated": "2011-12-27T11:48:45.000+0000" }, { "id": "177323", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There is a fix ready but until there is a valid test, it cannot be submitted.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T13:54:14.000+0000", "updated": "2011-12-27T13:54:14.000+0000" }, { "id": "177332", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix was tested by redirecting to a file containing the following PHP snippet:\r\n\r\n{code}\r\n\r\n{code}\r\n\r\nNote that reviewers may require an external server to test this; I tested locally via an apache install.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T14:42:45.000+0000", "updated": "2011-12-27T14:42:45.000+0000" }, { "id": "179825", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "clean up - closing", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-18T17:28:31.000+0000", "updated": "2012-01-18T17:28:31.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }