mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-02-28 23:10:29 +00:00
set response statuscode even if content length is zero
This commit is contained in:
parent
6c6fd49060
commit
9f4192f014
@ -72,6 +72,10 @@
|
||||
|
||||
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location
|
||||
{
|
||||
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)downloadTask.response;
|
||||
if (!_statusCode) {
|
||||
_statusCode = [NSNumber numberWithLong:httpResponse.statusCode];
|
||||
}
|
||||
NSURL *destURL = [NSURL fileURLWithPath:_params.toFile];
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSError *error = nil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user