mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 04:20:21 +08:00
Respect the root keyPath when constructing a temporary object mapping provider. Covers the case where an object mapping targeting nested content is being directly specified.
This commit is contained in:
@@ -407,8 +407,6 @@
|
||||
nil];
|
||||
error = [NSError errorWithDomain:RKRestKitErrorDomain code:RKRequestBaseURLOfflineError userInfo:userInfo];
|
||||
[self didFailLoadWithError:error];
|
||||
|
||||
// TODO: Is this needed here? Or can we just return a nil response and everyone will be happy??
|
||||
response = [[[RKResponse alloc] initWithSynchronousRequest:self URLResponse:URLResponse body:payload error:error] autorelease];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,6 @@ extern NSString* cacheURLKey;
|
||||
- (id)initWithSynchronousRequest:(RKRequest*)request URLResponse:(NSHTTPURLResponse*)URLResponse body:(NSData*)body error:(NSError*)error {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
// TODO: Does the lack of retain here cause problems with synchronous requests, since they
|
||||
// are not being retained by the RKRequestQueue??
|
||||
_request = request;
|
||||
_httpURLResponse = [URLResponse retain];
|
||||
_failureError = [error retain];
|
||||
|
||||
Reference in New Issue
Block a user