Revision: 29984
http://sourceforge.net/p/bibdesk/svn/29984
Author: hofman
Date: 2026-02-07 23:11:32 +0000 (Sat, 07 Feb 2026)
Log Message:
-----------
No need to get Content-Disposition header field twice
Modified Paths:
--------------
trunk/bibdesk/BDSKDownloadManager.m
Modified: trunk/bibdesk/BDSKDownloadManager.m
===================================================================
--- trunk/bibdesk/BDSKDownloadManager.m 2026-02-03 17:20:04 UTC (rev 29983)
+++ trunk/bibdesk/BDSKDownloadManager.m 2026-02-07 23:11:32 UTC (rev 29984)
@@ -404,20 +404,7 @@
}
- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse
*)response {
- NSString *filename = [response suggestedFilename];
- NSString *disposition = [[download request]
valueForHTTPHeaderField:@"Content-Disposition"];
- if ([disposition hasPrefix:@"attachment; filename*=UTF-8''"]) {
- disposition = [disposition substringFromIndex:29];
- if ([disposition length])
- filename = [disposition stringByRemovingPercentEncoding];
- } else if ([disposition hasPrefix:@"attachment; filename="]) {
- disposition = [disposition substringFromIndex:21];
- if ([disposition hasPrefix:@"\""] && [disposition hasSuffix:@"\""])
- disposition = [disposition substringWithRange:NSMakeRange(1,
[disposition length] - 2)];
- if ([disposition length])
- filename = disposition;
- }
- [[downloadManager webDownloadForDownload:download]
setSuggestedFilename:filename];
+ [[downloadManager webDownloadForDownload:download]
setSuggestedFilename:[response suggestedFilename]];
}
// -download:decideDestinationWithSuggestedFilename: is not functional anymore
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit