Skip to content

Commit

Permalink
enhancements up to Photosophia 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
norsez committed Dec 21, 2012
1 parent 3809e3b commit eed02ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Classes/BDMultiDownloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
@param completionWithJSONObject block returned with JSON object, nil if error.
@param options NSJSONReadingOptions settings
*/
- (void) jsonWithRequest:(NSURLRequest*)jsonRequest options:(NSJSONWritingOptions)options completion:(void(^)(id))completionWithJSONObject;
- (void) jsonWithRequest:(NSURLRequest*)jsonRequest options:(NSJSONWritingOptions)options completion:(void(^)(id))completionWithJSONObject;



/**
* Convenient method for downloading image files.
Expand Down
7 changes: 5 additions & 2 deletions Classes/BDMultiDownloader.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ -(NSString *)requestId
// return [NSString stringWithFormat:@"%@%@%@",self.URL.absoluteString, self.HTTPMethod, self.HTTPBody];
// }
// return self.URL.absoluteString;
return [(NSMutableURLRequest*)self valueForHTTPHeaderField:BDURLRequestRequestIdKey];
NSString* rid = [(NSMutableURLRequest*)self valueForHTTPHeaderField:BDURLRequestRequestIdKey];
return rid;
}
@end

Expand Down Expand Up @@ -406,7 +407,7 @@ -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)erro
}
}
[self launchNextConnection];

// DLog(@"%@", error);
}

- (id)init
Expand All @@ -424,6 +425,8 @@ - (id)init
[_dataCache setName:@"data cache"];
[_dataCache setCountLimit:kMaxCache];
self.connectionTimeout = kIntervalDefaultTimeout;

requestId = 100;
}
return self;
}
Expand Down

0 comments on commit eed02ea

Please sign in to comment.