Showing posts with label NSCharacterSet. Show all posts
Showing posts with label NSCharacterSet. Show all posts

Thursday, October 27, 2011

How to Handle HTTP Headers in iOS4 and iOS5

One of several minor incompatibilities between iOS4 and iOS5 is the way how HTTP headers are reported. The difference is in the capitalization and white-space handling:
iOS4: @"Myapp-Sampleheader ";
iOS5: @"MyApp-SampleHeader";
Once you figure out this is the problem, the fix is quite easy. Here is a generic routine to handle both cases at the same time: