Fix all remaining broken tests

This commit is contained in:
Blake Watters
2012-09-25 21:18:39 -04:00
parent e56754cb65
commit fee0c0dac0
8 changed files with 84 additions and 79 deletions

View File

@@ -77,3 +77,13 @@ NSString *RKPercentEscapedQueryStringFromStringWithEncoding(NSString *string, NS
return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFLegalCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding));
}
NSDictionary *RKQueryParametersFromStringWithEncoding(NSString *string, NSStringEncoding encoding)
{
NSRange chopRange = [string rangeOfString:@"?"];
if (chopRange.length > 0) {
chopRange.location += 1; // we want inclusive chopping up *through *"?"
if (chopRange.location < [string length]) string = [string substringFromIndex:chopRange.location];
}
return RKDictionaryFromURLEncodedStringWithEncoding(string, encoding);
}