Private
Public Access
1
0

Experimental SSL support

This commit is contained in:
James Magahern
2019-01-22 23:31:36 -08:00
parent 90775ebbba
commit 0cb907e2ad
18 changed files with 370 additions and 47 deletions

View File

@@ -27,20 +27,20 @@
NSString *guid = [self valueForQueryItemWithName:@"guid"];
if (!guid) {
NSLog(@"No query item provided");
MBIMLogInfo(@"No query item provided");
response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
break;
}
IMFileTransfer *transfer = [[IMFileTransferCenter sharedInstance] transferForGUID:guid];
if (!transfer) {
NSLog(@"No transfer found for guid: %@", guid);
MBIMLogInfo(@"No transfer found for guid: %@", guid);
response = [[HTTPErrorResponse alloc] initWithErrorCode:404];
break;
}
if (![transfer existsAtLocalPath]) {
NSLog(@"We don't have the file for this yet (still downloading to server?)");
MBIMLogInfo(@"We don't have the file for this yet (still downloading to server?)");
response = [[HTTPErrorResponse alloc] initWithErrorCode:404];
break;
}
@@ -48,7 +48,7 @@
NSString *localPath = [transfer localPath];
NSData *responseData = [NSData dataWithContentsOfFile:localPath];
if (!responseData) {
NSLog(@"Wasn't able to load data from local path: %@", localPath);
MBIMLogInfo(@"Wasn't able to load data from local path: %@", localPath);
response = [[HTTPErrorResponse alloc] initWithErrorCode:404];
break;
}