Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from rsieiro/master
Browse files Browse the repository at this point in the history
Fixed a few bugs
  • Loading branch information
MugunthKumar committed Dec 13, 2011
2 parents 64d09ed + 63b29fb commit f899314
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion MKNetworkKit/Categories/NSString+MKNetworkKitAdditions.m
Expand Up @@ -67,8 +67,15 @@ - (NSString*) urlEncodedString {
}

- (NSString*) urlDecodedString {

CFStringRef decodedCFString = CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
(__bridge CFStringRef) self,
CFSTR(""),
kCFStringEncodingUTF8);

return [self stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
// We need to replace "+" with " " because the CF method above doesn't do it
NSString *decodedString = [[NSString alloc] initWithString:(__bridge_transfer NSString*) decodedCFString];
return (!decodedString) ? @"" : [decodedString stringByReplacingOccurrencesOfString:@"+" withString:@" "];
}

@end
2 changes: 1 addition & 1 deletion MKNetworkKit/MKNetworkOperation.h
Expand Up @@ -104,7 +104,7 @@ typedef void (^MKNKAuthBlock)(NSURLAuthenticationChallenge* challenge);
* @seealso
* addHeaders:
*/
@property (nonatomic, strong, readonly) NSHTTPURLResponse *readonlyPostDictionary;
@property (nonatomic, strong, readonly) NSDictionary *readonlyPostDictionary;

/*!
* @abstract The internal request object's method type
Expand Down

0 comments on commit f899314

Please sign in to comment.