mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-23 04:34:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f6cbe4577 |
+6
-24
@@ -25,21 +25,6 @@
|
||||
|
||||
#if SPARKLE_IS_COMPATIBLE_WITH_DEVMATE
|
||||
CF_EXPORT CFDictionaryRef DMCopyHTTPRequestHeaders(CFBundleRef appBundle, CFDataRef httpBodyData);
|
||||
|
||||
NSArray *SUGetAllDevMateURLHosts(void);
|
||||
NSArray *SUGetAllDevMateURLHosts(void)
|
||||
{
|
||||
static NSArray *sAllKnownDevMateURLHosts = nil;
|
||||
if (nil == sAllKnownDevMateURLHosts)
|
||||
{
|
||||
sAllKnownDevMateURLHosts = [[NSArray alloc] initWithObjects:
|
||||
@"updates.devmate.com",
|
||||
@"test.updates.aws.devmate.vpn",
|
||||
nil];
|
||||
}
|
||||
|
||||
return sAllKnownDevMateURLHosts;
|
||||
}
|
||||
#endif
|
||||
|
||||
@interface SUBasicUpdateDriver () <NSURLDownloadDelegate>; @end
|
||||
@@ -169,16 +154,13 @@ NSArray *SUGetAllDevMateURLHosts(void)
|
||||
- (void)updateURLRequestIfNeeds:(NSMutableURLRequest *)request
|
||||
{
|
||||
#if SPARKLE_IS_COMPATIBLE_WITH_DEVMATE
|
||||
if ([SUGetAllDevMateURLHosts() containsObject:[[request URL] host]])
|
||||
{
|
||||
CFBundleRef hostBundle = CFBundleCreate(kCFAllocatorDefault, (CFURLRef)[NSURL fileURLWithPath:[host bundlePath]]);
|
||||
NSDictionary *devmateHeaders = (NSDictionary *)DMCopyHTTPRequestHeaders(hostBundle, NULL) ? : [NSDictionary new];
|
||||
[request setAllHTTPHeaderFields:(NSDictionary *)devmateHeaders];
|
||||
CFBundleRef hostBundle = CFBundleCreate(kCFAllocatorDefault, (CFURLRef)[NSURL fileURLWithPath:[host bundlePath]]);
|
||||
NSDictionary *devmateHeaders = (NSDictionary *)DMCopyHTTPRequestHeaders(hostBundle, NULL) ? : [NSDictionary new];
|
||||
[request setAllHTTPHeaderFields:(NSDictionary *)devmateHeaders];
|
||||
|
||||
[devmateHeaders release];
|
||||
if (NULL != hostBundle)
|
||||
CFRelease(hostBundle);
|
||||
}
|
||||
[devmateHeaders release];
|
||||
if (NULL != hostBundle)
|
||||
CFRelease(hostBundle);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user