Fix test failure. Encoded URLs getting extra 25's.

This commit is contained in:
Ray Fix
2011-12-09 18:18:08 -08:00
parent 4a45a15da1
commit 7eaa0bccfe

View File

@@ -42,7 +42,7 @@
- (id)initWithBaseURLString:(NSString*)baseURLString resourcePath:(NSString*)resourcePath queryParams:(NSDictionary*)queryParams {
NSString* resourcePathWithQueryString = RKPathAppendQueryParams(resourcePath, queryParams);
NSURL *baseURL = [NSURL URLWithString:baseURLString];
NSString* completePath = [[[baseURL path] stringByAppendingPathComponent:resourcePathWithQueryString] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString* completePath = [[baseURL path] stringByAppendingPathComponent:resourcePathWithQueryString];
// Preserve trailing slash in resourcePath
if (resourcePath && [resourcePath characterAtIndex:[resourcePath length] - 1] == '/') {
completePath = [completePath stringByAppendingString:@"/"];