Create a custom header with a name, and find it by this name case insensitive
While 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.
In 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".
The debug output on the iPhone 4.3 Simulator was:
[DEBUG] Custom response header: my-custom-header = undefined
The debug output on the iPhone 5 Simulator was:
[DEBUG] Custom response header: my-custom-header = header value