Merge pull request #321 from tomwans/master

Fix an issue where _skippedCharacterSet would get dealloc'd early
This commit is contained in:
Mattt Thompson 2012-04-28 12:41:48 -07:00
commit 904d6ba50d

View file

@ -29,7 +29,7 @@ NSSet * AFContentTypesFromHTTPHeader(NSString *string) {
static NSCharacterSet *_skippedCharacterSet = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_skippedCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@" ,"];
_skippedCharacterSet = [[NSCharacterSet characterSetWithCharactersInString:@" ,"] retain];
});
if (!string) {