Fixes #428, related to a misspelling in the request:didReceiveData:totalBytesReceived:totalBytesExpectedToReceive:

This commit is contained in:
Jeff Arena
2012-01-20 12:13:40 -05:00
parent db0646ed19
commit 53ce2260bd
2 changed files with 3 additions and 3 deletions

View File

@@ -516,7 +516,7 @@ typedef void(^RKRequestDidFailLoadWithErrorBlock)(NSError *error);
/**
* Sent when request has received data from remote site
*/
- (void)request:(RKRequest*)request didReceiveData:(NSInteger)bytesReceived totalBytesReceived:(NSInteger)totalBytesReceived totalBytesExectedToReceive:(NSInteger)totalBytesExpectedToReceive;
- (void)request:(RKRequest*)request didReceiveData:(NSInteger)bytesReceived totalBytesReceived:(NSInteger)totalBytesReceived totalBytesExpectedToReceive:(NSInteger)totalBytesExpectedToReceive;
/**
* Sent to the delegate when a request was cancelled

View File

@@ -181,8 +181,8 @@ extern NSString* cacheURLKey;
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
[_body appendData:data];
[_request invalidateTimeoutTimer];
if ([[_request delegate] respondsToSelector:@selector(request:didReceiveData:totalBytesReceived:totalBytesExectedToReceive:)]) {
[[_request delegate] request:_request didReceiveData:[data length] totalBytesReceived:[_body length] totalBytesExectedToReceive:_httpURLResponse.expectedContentLength];
if ([[_request delegate] respondsToSelector:@selector(request:didReceiveData:totalBytesReceived:totalBytesExpectedToReceive:)]) {
[[_request delegate] request:_request didReceiveData:[data length] totalBytesReceived:[_body length] totalBytesExpectedToReceive:_httpURLResponse.expectedContentLength];
}
}