mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eaedee9ab |
Vendored
+12
-1
@@ -112,7 +112,18 @@
|
|||||||
_delegate = delegate;
|
_delegate = delegate;
|
||||||
_inBackground = background;
|
_inBackground = background;
|
||||||
|
|
||||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0];
|
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
||||||
|
NSString *customTimeout = processInfo.environment[@"SPARKLE_TIMEOUT"];
|
||||||
|
NSTimeInterval timeout;
|
||||||
|
if (customTimeout != nil) {
|
||||||
|
timeout = customTimeout.doubleValue;
|
||||||
|
} else {
|
||||||
|
timeout = 60.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"SPARKLE_TIMEOUT: %f", timeout);
|
||||||
|
|
||||||
|
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:timeout];
|
||||||
|
|
||||||
if (userAgent != nil) {
|
if (userAgent != nil) {
|
||||||
[request setValue:(NSString * _Nonnull)userAgent forHTTPHeaderField:@"User-Agent"];
|
[request setValue:(NSString * _Nonnull)userAgent forHTTPHeaderField:@"User-Agent"];
|
||||||
|
|||||||
Reference in new issue
Block a user