mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
macosx/BlocklistDownloader.mm: (#6096)
in (void)startDownload: now trimming whitespaces at the beginning and end of the BlocklistURL, otherwise the download will fail, if the URL contains a beginning or trailing whitespace. Signed-off-by: Benedikt Bergenthal <benedikt@kdrennert.de> Co-authored-by: Benedikt Bergenthal <benedikt@kdrennert.de>
This commit is contained in:
parent
eb58996c9f
commit
b5eaff114c
1 changed files with 6 additions and 2 deletions
|
@ -175,10 +175,14 @@ BlocklistDownloader* fBLDownloader = nil;
|
|||
{
|
||||
urlString = @"";
|
||||
}
|
||||
else if (![urlString isEqualToString:@""] && [urlString rangeOfString:@"://"].location == NSNotFound)
|
||||
else
|
||||
{
|
||||
urlString = [urlString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||
if (![urlString isEqualToString:@""] && [urlString rangeOfString:@"://"].location == NSNotFound)
|
||||
{
|
||||
urlString = [@"https://" stringByAppendingString:urlString];
|
||||
}
|
||||
}
|
||||
|
||||
NSURLSessionDownloadTask* task = [self.fSession downloadTaskWithURL:[NSURL URLWithString:urlString]];
|
||||
[task resume];
|
||||
|
|
Loading…
Reference in a new issue